5 ms·
That's why most people use a third party library. For me it's fine for most things, what were you doing? An example of such a library I've used is https://githu
by andy_ppp 7y ago
That's why most people use a third party library. For me it's fine for most things, what were you doing? An example of such a library I've used is https://github.com/bitwalker/timex https://github.com/bitwalker/timex which seems quite complete.
- conradfr 7y agoTimex is great. However sometimes I feel I only use it because of the weird default (non-)handling of timezones by DateTime.
- mcmatterson 7y agoAs someone who writes Elixir full-time in a product with deeply complex date / time needs (spanning multiple timezones, sources of time, multiple meanings of 'month', etc), I can say with some conviction that the the simplicity of Elixir's DateTime module is most definitely a feature. The lack of something as transparent in Rails was / is a huge part of what makes our team so productive since porting the product to Elixir; NaiveDateTime alone has saved us from more bugs than I care to think about. Between Elixir core and Timex, they've definitely solved the harder corners of time as well as any other library or platform I've seen.
- bitscrapper 7y agoFWIW, timezone handling was added in v1.8 or v1.9. At this point I think Elixir has ported all features from Timex, except date parsing and date formatting.
- conradfr 7y agoTo be fair that's two big usecases for datetimes in any software ;)