JavaScript Date/Time Handling

Discussions revolve around the pitfalls of JavaScript's native Date object, recommendations for libraries like Luxon, date-fns, js-joda, and the upcoming Temporal API, and advice against rolling custom date/time solutions.

➡️ Stable 0.6x Web Development
4,841
Comments
20
Years Active
5
Top Authors
#6897
Topic ID

Activity Over Time

2007
5
2008
26
2009
62
2010
64
2011
104
2012
296
2013
196
2014
205
2015
188
2016
281
2017
222
2018
202
2019
220
2020
399
2021
474
2022
539
2023
400
2024
406
2025
484
2026
68

Keywords

documentfoundation.org JS UI i.e TS RFC OP github.com GitHub API date dates var js temporal javascript interval calendar leap 1000

Sample Comments

kiwijamo • Mar 1, 2024 • View on HN

Another reason to use exisiting date/time libraries instead of rolling your own.

Klathmon • Jun 30, 2017 • View on HN

Welcome to the rabbit hole that is date/time handling.

beznet • Feb 13, 2021 • View on HN

I have a date/time bug that I really dont feel like figuring out right now

Ygg2 • Jun 11, 2023 • View on HN

It's going to be hard to have a date/time format when no standardized date/time lib.

kentnguyen • Jan 13, 2012 • View on HN

Cool stuff. Great for people who don't want to mess with Date handling.

k__ • Nov 18, 2017 • View on HN

How does it compare to date-fns?

TazeTSchnitzel • Jun 30, 2017 • View on HN

Is this using a proper date/time library underneath, or did you write it yourself?

dxgarnish • Dec 2, 2020 • View on HN

I highly recommend using Luxon for dates in JS. At the very least reading up on the library.

darepublic • Jan 31, 2025 • View on HN

Not all use cases related to time are too complex to just use the existing javascript Date

noodlesUK • Dec 29, 2021 • View on HN

What’s the comparison with the well known JS/TS date time libraries such as date-fns or the older moment.js?