Robert MacLean
26 February 2026
Dates in JavaScript are terrible. We all know this, but they made big strides for it to not suck anymore.
So what do we get. No more weird constructor passing numbers around. Like you want now?
Temporal.Now
That returns a proper prototypal object. Not nonsense... and then everything gets easier. I am not going to explain these, you will just know how they work from reading - it is that nice
Temporal.Now.plainDateISO()
or how about
Temporal.Now.add({days: 1})
or
Temporal.Now.add({days: 1}).subtract({years:2})
Resources
- Great blog post which goes into way more detail
- Can I Use for your browser checks
- Deno supports it as of yesterday (of course, they are amazing) ... no word on node, but you could polyfill