Hacker News new | ask | show | jobs
by _kblcuk_ 1921 days ago
They're pretty optimistic about how long this script will be in use:

``` if (l_y < 1900 || l_y > 9999) { l_err = 1 ; l_errstring = "Year is invalid."; } ```

1 comments

My frontend date code just passes a millisecond timestamp to the JS Date object constructor to do validation, so technically any code I've written could be actively deployed until the maximum valid JS Date, which is in the year 275,760. (https://262.ecma-international.org/5.1/#sec-15.9.1.1)

Something has gone seriously wrong with human society if that ever actually happens.