Skip to content

Leap year problem #34

@b00bl1k

Description

@b00bl1k

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions