Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leap year problem #34

Open
b00bl1k opened this issue Feb 29, 2024 · 0 comments
Open

Leap year problem #34

b00bl1k opened this issue Feb 29, 2024 · 0 comments

Comments

@b00bl1k
Copy link

b00bl1k commented Feb 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant