5 ms·
Luxon author here, happy to answer anything. Edit: Here's a thing I wrote about why this exists: https://moment.github.io/luxon/docs/manual/faq/why.html https:
by icambron 9y ago
Luxon author here, happy to answer anything.
Edit: Here's a thing I wrote about why this exists: https://moment.github.io/luxon/docs/manual/faq/why.html https://moment.github.io/luxon/docs/manual/faq/why.html
- nevir 9y agoNo questions - just a huge thanks for doing this!
- notaboutdave 9y agoFirst of all, thanks for sharing your great work. The support for non-Gregorian output is interesting. Are there any plans to extend full support beyond Gregorian? For example, something like: dt.plus({months: 7, calendar: 'hebrew'})
- icambron 9y agoThanks! No, there's no plan to do that. The trouble is that Luxon has no idea how the Hebrew calendar works; it only knows how to output the non-Gregorian stuff because your browser already can via the Intl.DateTimeFormat API. Luxon finds some interesting ways to abuse that API to add some neat features like internationalized parsing and full time zone support, but there's a limit there. To add 7 Hebrew months, Luxon would actually have to be able translate arbitrary Hebrew dates into timestamps, and I can't think of a way to make it do that without any real knowledge of the calendaring system.
- Asparagirl 9y agoYou want HebCal for that. Open source! Has an API available, too! http://www.hebcal.com/home/developer-apis http://www.hebcal.com/home/developer-apis
- seanp2k2 9y agoWhen 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