kennethreitz / kennethreitz/maya
day_first parse when year_first format does nothing?
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Can't get it to parse as american time when the year is written first
**Environment and Version**
* OS (incl. terminal and shell used): Win 10
* Python Version: 3.10.1
* maya Version: 0.6.1
* Your timezone: GMT+3
**To Reproduce**
```
>>> maya.parse("2024-01-12 17:13:51", "UTC", True).datetime()
datetime.datetime(2024, 1, 12, 17, 13, 51, tzinfo=)
>>> maya.parse("2024-01-12 17:13:51", "UTC", False).datetime()
datetime.datetime(2024, 1, 12, 17, 13, 51, tzinfo=)
```
**Expected behavior**
A way to make it parse `2024-01-12 ` as 1st of December, not 12th of January
Contributor guide
Research direction
Start at the maya.parse entry point and reproduce both calls from the issue with Python 3.10.1 and maya 0.6.1. Determine how the day_first and year_first settings are interpreted for the year-first input, then verify that the selected setting produces the expected January or December date.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100