News for hackers. Stuff that matters.
Re:ISO-8601, YYYY, yyyy, and why your year may be wrong by robrichard on Wednesday December 26, 2018 @02:32PM (#18764179)
Formatting dates with a format string is an anti-pattern. Format strings are too easy to get wrong and don't scale when you need to account for different locales. JavaScript's Intl functions do this correctly by providing an api that accepts a locale and options like weekday: narrow|short|long, year: numeric|2-digit, etc.

There are no comments on this comment yet.