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

Confused parsing #268

Closed
lcgong opened this issue Sep 26, 2015 · 2 comments
Closed

Confused parsing #268

lcgong opened this issue Sep 26, 2015 · 2 comments

Comments

@lcgong
Copy link

lcgong commented Sep 26, 2015

The following parsing result is confused. In some conditions, it's really difficult to debug. If the given string can not be parsed right, it's better to raise a ParserError rather than to set a default value.

>>> arrow.get('2015-7-3')
<Arrow [2015-01-01T00:00:00+00:00]>

>>> arrow.get('2015-3-3')
<Arrow [2015-01-01T00:00:00+00:00]>
@achembarpu
Copy link
Contributor

You should probably pass the format to arrow, instead:

>>> arrow.get('2015-7-3', ['YYYY-M-D'])
<Arrow [2015-07-03T00:00:00+00:00]>

@andrewelkins
Copy link
Contributor

Check out #91 it'll be handled there

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

3 participants