Revised the documentation of the PeriodDescription utility.

This commit is contained in:
依瑪貓 2023-03-08 19:20:19 +08:00
parent ed18b81ad8
commit 0ef6409f75

View File

@ -278,15 +278,15 @@ class PeriodDescription:
return self.__get_day_desc() return self.__get_day_desc()
def __get_since_desc(self) -> str: def __get_since_desc(self) -> str:
"""Returns the description without the end time. """Returns the description without the end day.
:return: The description without the end time. :return: The description without the end day.
""" """
def get_start_desc() -> str: def get_start_desc() -> str:
"""Returns the description of the start time. """Returns the description of the start day.
:return: The description of the start time. :return: The description of the start day.
""" """
if self.__start.month == 1 and self.__start.day == 1: if self.__start.month == 1 and self.__start.day == 1:
return str(self.__start.year) return str(self.__start.year)
@ -297,14 +297,14 @@ class PeriodDescription:
return gettext("since %(start)s", start=get_start_desc()) return gettext("since %(start)s", start=get_start_desc())
def __get_until_desc(self) -> str: def __get_until_desc(self) -> str:
"""Returns the description without the start time. """Returns the description without the start day.
:return: The description without the start time. :return: The description without the start day.
""" """
def get_end_desc() -> str: def get_end_desc() -> str:
"""Returns the description of the end time. """Returns the description of the end day.
:return: The description of the end time. :return: The description of the end day.
""" """
if self.__end.month == 12 and self.__end.day == 31: if self.__end.month == 12 and self.__end.day == 31:
return str(self.__end.year) return str(self.__end.year)