diff --git a/biscuit/apps/chronos/util.py b/biscuit/apps/chronos/util.py index cfc5f8d1ebffe2197d09e08584f050084203f4bb..fe5f203b31f722ee0e65fe9b115897c0b06705ca 100644 --- a/biscuit/apps/chronos/util.py +++ b/biscuit/apps/chronos/util.py @@ -17,6 +17,8 @@ class CalendarWeek: @classmethod def from_date(cls, when: date): + """ Get the calendar week by a date object (the week this date is in). """ + return cls(year=when.strftime('%Y'), week=when.strftime('%V')) def __post_init__(self) -> None: