The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

[Bugfix] Fix the month name printed by the main module

main
Gergely Polonkai 9 months ago
parent 57086bf959
commit b1e8c768be
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
  1. 22
      minari_date/__init__.py

@ -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…
Cancel
Save