habito icon indicating copy to clipboard operation
habito copied to clipboard

Leap year problem

Open b00bl1k opened this issue 4 months ago • 0 comments

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.

b00bl1k avatar Feb 29 '24 09:02 b00bl1k