Hacker News new | ask | show | jobs
My experience with JavaScript's Date and the missing year 0 (github.com)
2 points by AlexTelon 3530 days ago
1 comments

TL;DR : GIGO - Garbage In, Garbage Out.

(For reference: I worked on my company's ANSI Datetime implementation over 20 years ago, and the ANSI spec made it clear: using an invalid date (like A.D. 0) or an expression that yields an invalid date (e.g. "3/31/2017" - 1 UNITS MONTH) must always return an error and never just return wrong or garbage data.