Remix.run Logo
WorldMaker 2 days ago

> I use a few libraries (for mapping, datetime

I'm really looking forward to Temporal [0] reaching a larger baseline. Between that and a lot of recent Intl pieces we are so close to not needing libraries for much of anything datetime related.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

mholt a day ago | parent [-]

Yeah, dealing with date/time in JS has been a HUGE pain. I haven't tried Temporal yet but I hope it's better.

WorldMaker a day ago | parent [-]

I've used it a bit already. You can use it with an experimental flag in Deno. It takes a lot of inspiration (from among others) from the java.time library added in Java 8+ in a similar way that JS' original Date class is related to the very original Java Date class, so it basically catches up on 8+ versions of Java.

It supports just about all the Date math, comparison, and calendar conversion you could ever want. It has nice toLocaleString() formatting options. It's built on immutable objects to avoid a whole class of bugs with the current JS Date.