News for hackers. Stuff that matters.
Re:Date is out, Temporal is in by crabl on Monday January 12, 2026 @10:56AM (#46590146)
we've been using this Temporal polyfill and it's been awesome so far: https://github.com/js-temporal/temporal-polyfill
Re:Date is out, Temporal is in by whizzter on Monday January 12, 2026 @11:08AM (#46590349)
How is it compared to moment and especially luxon?
Re:Date is out, Temporal is in by kristo on Monday January 12, 2026 @11:53AM (#46591046)
It’s a web standard api and very small weight. Highly recommend.
Re:Date is out, Temporal is in by socalgal2 on Monday January 12, 2026 @02:18PM (#46592915)
Didn't moment basically say in so many words, use Temporal?
Re:Date is out, Temporal is in by WorldMaker on Monday January 12, 2026 @09:06PM (#46596601)
Moment said many years ago "use Luxon" [1]. Luxon is not yet at the "use Temporal" stage [2].

[1] https://momentjs.com/docs/#/-project-status/

[2] https://github.com/moment/luxon/discussions/1742#discussionc...

Re:Date is out, Temporal is in by socalgal2 on Tuesday January 13, 2026 @02:11AM (#46598103)
Re:Date is out, Temporal is in by MrJohz on Monday January 12, 2026 @03:51PM (#46594142)
It is a lot more complex than moment, but only because there's a lot of inherent complexity to dates and times that moment just doesn't deal with. So you need to be explicit about whether you're dealing with dates, times, or datetime objects, whether or not the object you're working with has a timezone, etc. Where moment is generally designed to have a convenient API, Temporal is designed to have a correct API.
Re:Date is out, Temporal is in by joshkel on Tuesday January 13, 2026 @09:42AM (#46601590)
The main selling point for me is that it has proper data times for dates, times, etc.

Most date/time libraries that I've seen have a only single "date/time" or "timestamp" type, then they have to do things like representing "January 13 2026" as "January 13 2026 at midnight local time" or "January 13 2026 at midnight UTC."

Temporal has full-fledged data types representing the different concepts: an Instant is a point in time. A PlainDate is just a date. A PlainTime is just a time. ("We eat lunch at 11am each day.") A ZonedDateTime is an Instant in a known time zone. Etc.

Temporal draws a lot of inspiration from Java's Joda-Time (which also went on to inspire .NET's Noda Time, Java's official java.time API, and JavaScript's js-joda). This is helpful; it means that some concepts can transfer if you're working in other languages. And, more importantly, it means that it benefits from a lot of careful thought on how to ergonomically and effectively represent date/time complexities.

Re:Date is out, Temporal is in by mediumdeviation on Monday January 12, 2026 @01:40PM (#46592448)
Note that this is 51kb, it's not exactly lightweight https://bundlephobia.com/package/@js-temporal/[email protected]. Still good for forward compatibility or on the server, but for smaller apps it's significant.
Re:Date is out, Temporal is in by LtdJorge on Monday January 12, 2026 @02:59PM (#46593422)
Yep, I’ve been using this one which is lighter (20kB): https://github.com/fullcalendar/temporal-polyfill/