habito
habito copied to clipboard
Leap year problem
Hi, today I faced an exception:
File ".../habito/habito/commands/checkin.py", line 28, in checkin
d = datetime.strptime(date, "%m/%d").replace(year=datetime.now().year)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/_strptime.py", line 579, in _strptime_datetime
return cls(*args)
^^^^^^^^^^
ValueError: day is out of range for month
I think it is related to the leap year.