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

Parsing a year creates a date in the 1st of July #25

Closed
msamoylov opened this issue Jul 21, 2017 · 2 comments
Closed

Parsing a year creates a date in the 1st of July #25

msamoylov opened this issue Jul 21, 2017 · 2 comments

Comments

@msamoylov
Copy link

Is it a bug or undocumented feature? Not sure if I understand it. Thanks in advance.

In [1]: import moment

In [2]: moment.date('2000').date
Out[2]: datetime.datetime(2000, 7, 1, 0, 0)
@zachwill
Copy link
Owner

zachwill commented Jul 22, 2017

Hmmm, good catch. Looks like it's part of dateparser's default settings. Don't see a flag to change it to January — like the PREFER_DAY_OF_MONTH flag.

@zachwill
Copy link
Owner

zachwill commented Nov 5, 2017

Until there's an update in dateparser, I'm not sure how to change this behavior. Sorry about that.

@zachwill zachwill closed this as completed Nov 5, 2017
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

2 participants