top | item 27360584

(no title)

evangow | 4 years ago

Related. I can't wait for [Temporal](https://github.com/tc39/proposal-temporal) - which hit Stage 3 a few months ago - to bring sanity to time in the browser. Combined with Intl, it will be much easier to build universal calendaring.

I think the major thing that will take time behind getting Temporal to Stage 4 is aligning with IETF on [a draft update RFC 3339](https://github.com/ryzokuken/draft-ryzokuken-datetime-extend...)

discuss

order

yuchi|4 years ago

I recently rewrote a very complex, 600-ish lines, legacy date mangling algorithm from moment to the Temporal poly fill and was a breeze to use.

If you have some experience with Luxon or similar immutable date/time data types then you’ll get to use Temporal in no time. The API is incredibly ergonomic and apparently useless things (such as YearMonth) become so useful for even simpler cases.

lifthrasiir|4 years ago

> [...] apparently useless things (such as YearMonth) become so useful for even simpler cases.

That piqued my interest. In my opinion partial date components are only useful for alternative calendar systems or localizations (previously: [1]), so if your use cases are not one of them I'd like to hear more about that.

[1] https://news.ycombinator.com/item?id=26284353