diff options
Diffstat (limited to 'datamaps/core/temporal.py')
-rw-r--r-- | datamaps/core/temporal.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/datamaps/core/temporal.py b/datamaps/core/temporal.py index 24a0d70..f97edfa 100644 --- a/datamaps/core/temporal.py +++ b/datamaps/core/temporal.py @@ -32,9 +32,13 @@ class Month: @property def end_date(self): if self._month_int == 2 and calendar.isleap(self.year): - return datetime.date(self.year, self._month_int, Month._end_ints[self._month_int] + 1) + return datetime.date( + self.year, self._month_int, Month._end_ints[self._month_int] + 1 + ) else: - return datetime.date(self.year, self._month_int, Month._end_ints[self._month_int]) + return datetime.date( + self.year, self._month_int, Month._end_ints[self._month_int] + ) @property def name(self): @@ -112,8 +116,10 @@ class FinancialYear: class Quarter: - """An object representing a financial quarter. This is mainly required for building - a :py:class:`core.master.Master` object. + """An object representing a financial quarter. + + This is mainly required for building a :py:class:`core.master.Master` + object. Args: quarter (int): e.g.1, 2, 3 or 4 @@ -166,7 +172,6 @@ class Quarter: year = self.year self.months.append(Month(m, year)) - def __str__(self): return f"Q{self.quarter} {str(self.year)[2:]}/{str(self.year + 1)[2:]}" |