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

Document getting a time from parsedatetime into a standard Python structure #112

Closed
dellis23 opened this issue Aug 5, 2015 · 2 comments
Closed

Comments

@dellis23
Copy link
Contributor

dellis23 commented Aug 5, 2015

It seems like most people will want some additional way to manipulate the information retrieved from parsedatetime. It would be nice to have a simple example of how they can do that.

For instance:

In [11]: from time import mktime

In [12]: from datetime import datetime

In [14]: datetime.fromtimestamp(mktime(parsedatetime.Calendar().parse('4:30')[0]))
Out[14]: datetime.datetime(2015, 8, 4, 4, 30)

Let me know if you think this is valuable and I can whip something up for the readme in a more concise / readable format.

@bear
Copy link
Owner

bear commented Aug 5, 2015

I think this would be an excellent start to an examples or howto page/section

+1 sir

@dellis23
Copy link
Contributor Author

dellis23 commented Aug 5, 2015

Fixed by #113

@dellis23 dellis23 closed this as completed Aug 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants