Trivial Facts About JavaScript Date
Fact 1
The integer value representing the month in JavaScript begins with 0 for January and goes up to 11 for December. For example:
Today's date can be represented as:
instead of:
Fact 2
In JavaScript, the date is based on a time value expressed in milliseconds, whereas the UNIX timestamp is expressed in seconds since 00:00:00 UTC on January 1, 1970.
For example, to convert a UNIX timestamp to a JavaScript date: