logoalt Hacker News

masklinn • yesterday at 6:25 PM • 2 replies • view on HN

In fairness, Temporal largely follows the model originally defined by Joda, and refined in java.time. So I'd say that Java is probably one of the few languages with a well designed datetime library in the standard library.

Temporal does improve some things (it has more strict zoning / less defaults, and improves serialization through RFC 9557), but some of the divergences are not necessarily improvements and rather divergences of opinion (e.g. java.time wilfully made non-ISO calendars second-class, Temporal makes them first class more like Joda, and it's one of the things Colebourne — the lead author of Joda and java.time — strongly disagrees with[1], but the Temporal authors have pretty compelling reasons for it[2]).

[1] https://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941... https://github.com/tc39/proposal-temporal/issues/5 https://github.com/tc39/proposal-temporal/issues/1454

[2] https://tc39.es/proposal-temporal/docs/calendar-review#why-a...


Replies

Sharlin • yesterday at 9:41 PM

And Java needed two very flawed attempts before finally getting it more-or-less right (and as you said, it was a third-party library in the end that was adopted rather than one designed by the core developers.)

vips7L • yesterday at 6:33 PM

I really enjoy working with java.time. It's one of the best additions to the standard library.

➕ show 1 reply