[Bugfix] Fix the month name printed by the main module
This commit is contained in:
parent
57086bf959
commit
b1e8c768be
@ -202,6 +202,9 @@ class MinariDateTime:
|
||||
|
||||
@property
|
||||
def minari_day(self):
|
||||
"""Return the current Minari calendar day
|
||||
"""
|
||||
|
||||
if not self._calculated:
|
||||
self._calculate_minari_parts()
|
||||
|
||||
@ -209,20 +212,27 @@ class MinariDateTime:
|
||||
|
||||
@property
|
||||
def minari_special(self):
|
||||
"""Return the name of the current special day, if any
|
||||
"""
|
||||
|
||||
if not self._calculated:
|
||||
self._calculate_minari_parts()
|
||||
|
||||
|
||||
return self._special_day
|
||||
|
||||
def __str__(self):
|
||||
output = f'{self.minari_year} '
|
||||
|
||||
if self._special_day is not None:
|
||||
output += self.SPECIAL_NAMES[self._special_day]
|
||||
if self.minari_special is not None:
|
||||
output += self.SPECIAL_NAMES[self.minari_special]
|
||||
else:
|
||||
month_name = self.MONTH_NAMES[self._minari_month]
|
||||
weekday_name = self.DAY_NAMES[self._minari_weekday]
|
||||
output += f'{month_name} {self._minari_day} ({weekday_name})'
|
||||
weekday = self._minari_weekday - 1
|
||||
|
||||
if weekday == -1:
|
||||
weekday = 5
|
||||
|
||||
month_name = self.MONTH_NAMES[self.minari_month - 1]
|
||||
weekday_name = self.DAY_NAMES[weekday]
|
||||
output += f'{month_name} {self.minari_day} ({weekday_name})'
|
||||
|
||||
return output
|
||||
|
Loading…
Reference in New Issue
Block a user