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

What is the second value returned by parse? #143

Closed
rohithpr opened this issue Nov 10, 2015 · 2 comments
Closed

What is the second value returned by parse? #143

rohithpr opened this issue Nov 10, 2015 · 2 comments

Comments

@rohithpr
Copy link

>>> c.parse('now')
(time.struct_time(tm_year=2015, tm_mon=11, tm_mday=10, tm_hour=19, tm_min=59, tm_sec=23, tm_wday=1, tm_yday=314, tm_isdst=0), 2)
>>> c.parse('hello')
(time.struct_time(tm_year=2015, tm_mon=11, tm_mday=10, tm_hour=19, tm_min=59, tm_sec=29, tm_wday=1, tm_yday=314, tm_isdst=0), 0)

I'm trying to figure out what the second value returned is (the 2 and the 0). Clearly it has some significance but I couldn't find any mention of it in the docs.

@bear
Copy link
Owner

bear commented Nov 10, 2015

It describes what type of date was found, it's documented in the source:

https://github.com/bear/parsedatetime/blob/master/parsedatetime/__init__.py#L1772

Note that after 2.3 is released we will be using the new Context flag to pass that information back, and it's documented:

https://github.com/bear/parsedatetime/blob/master/parsedatetime/context.py#L51

@rohithpr
Copy link
Author

Thanks a lot!

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