logoalt Hacker News

noodlesUKyesterday at 7:12 PM2 repliesview on HN

I'm really looking forward to the temporal api being universally available. Moment and Luxon are fairly good but sensible date/time handling is something that really ought to be baked into the platform ootb.


Replies

jpsimonsyesterday at 7:33 PM

I always thought the old Date is kind of elegant... increment anything with an overflow and it all wraps around correctly, like `d.setDate(d.getDate() + 100)` to advance a date 100 days. "March 208th" is interpreted like you'd expect, as are the hours and minutes and such.

Of course, complete lack of non-local non-GMT time zones is a huge downside.

show 2 replies
culiyesterday at 7:25 PM

Until then, a solid backfill has been available for quite some time