fixes
This commit is contained in:
parent
2aedc2df49
commit
ecd93e97b3
2 changed files with 10 additions and 3 deletions
|
@ -33,6 +33,13 @@ To create a new `Date` object call `new Date()` with one of the following argume
|
|||
|
||||
It's a lightweight numeric representation of a date. We can always create a date from a timestamp using `new Date(timestamp)` and convert the existing `Date` object to a timestamp using the `date.getTime()` method (see below).
|
||||
|
||||
Dates before 01.01.1970 have negative timestamps, e.g.:
|
||||
```js run
|
||||
// 31 Dec 1969
|
||||
let Dec31_1969 = new Date(-24 * 3600 * 1000);
|
||||
alert( Dec31_1969 );
|
||||
```
|
||||
|
||||
`new Date(datestring)`
|
||||
: If there is a single argument, and it's a string, then it is parsed automatically. The algorithm is the same as `Date.parse` uses, we'll cover it later.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue