Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The focus is just on converting dates, there's no idea of formatting dates (other than a simple, localized ISO string, which may be useful to some for further parsing). It returns an object with numeric properties, letting you decide on what to do with it and what the actual format should be.

Since it relies on the Intl implementation of the browser (which is supported by all modern browser, but only partly by later versions of MSIE), it's light-weight (ca 1.3 KB minified and gzipped) and should be up to date regarding day light saving time, etc., without any further maintenance required. (On the other hand, as you rely on a user's browser and the OS – as in the demo widget –, it is not recommended for mission critical tasks, like in banking. But this should be rather obvious to those designing such applications.)



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: