I was wondering which is the minimum and the maximum date allowed for a Javascript Date object. I found that the minimum date is something like 200000 B.C., but I couldn’t get any reference about it.
Does anyone know the answer? I just hope that it doesn’t depend on the browser.
An answer in “epoch time” (= milliseconds from 1970-01-01 00:00:00 UTC+00) would be the best.
From the spec, §15.9.1.1:
The third paragraph being the most relevant. Based on that paragraph, we can get the precise earliest date per spec from
new Date(-8640000000000000), which is Tuesday, April 20th, 271,821 BCE (BCE = Before Common Era, e.g., the year -271,821).