5 ms·
When can you make a Python version available? Datetime is by far my biggest gripe with Python. It takes many times the lines of code to do something “simple” wi
by seanp2k2 9y ago
When can you make a Python version available? Datetime is by far my biggest gripe with Python. It takes many times the lines of code to do something “simple” with it vs other languages (e.g. parse remote time stamp in a specific format, apppend time zone info to that, get local time + zone, normalize both to UTC, compare, present difference in human-readable format).
Here’s the python version of moment: https://github.com/zachwill/moment/blob/master/README.md https://github.com/zachwill/moment/blob/master/README.md
- BrandoElFollito 9y agoHave you tried arrow (my favorite), dolorean or a third one the name escapes me right now? I use arrow whenever I need to process a date, no matter the usage. Having a consistent interface is golden. EDIT I just realized that the author of moment in Python (you link to) also mentions arrow. I have to remember the name of the third package, it addressed some weaknesses in arrow (particularly issues with failed parsing which does not output an error)
- maxerickson 9y agoPossibly https://github.com/kennethreitz/maya https://github.com/kennethreitz/maya
- BrandoElFollito 9y agoI remember, it was Pendulum, https://github.com/sdispater/pendulum/ https://github.com/sdispater/pendulum/
- icambron 9y agoI'm not much of a Python person, but it seems like someone could port it without too much trouble. In particular, you wouldn't have to use the ugly tricks I used to make the time zone stuff work