I am parsing the following dates:
Date.parse('03/16/20') = 1584334800000
And
Date.parse('03/16/201') = -55817838000000
Why the second expression returns negative value?
Thanks
I am parsing the following dates:
Date.parse('03/16/20') = 1584334800000
And
Date.parse('03/16/201') = -55817838000000
Why the second expression returns negative value?
Thanks
Epoch time is the number of seconds since January 1, 1970.
The year 201 is before that date, so the number of seconds since 1970 is negative.
(Two digit years are converted to 20th or 21st century years automatically)