We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b36e7e0 commit 9592bb7Copy full SHA for 9592bb7
timetest.py
@@ -20,7 +20,7 @@ def truncate(cls, dt):
20
Returns:
21
date: The first day (January 1) of the decade in which `dt` falls.
22
"""
23
- return date(10 * (dt.year // 10), 1, 1)
+ return date(max(10 * (dt.year // 10), 1), 1, 1)
24
25
@classmethod
26
def get_index_for_date(cls, dt):
0 commit comments