Update date parse example

This commit is contained in:
Jesse Bonzo 2018-12-26 09:47:26 -08:00 committed by GitHub
parent e62dfd5254
commit 8b9fd5453b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,13 @@ To create a new `Date` object call `new Date()` with one of the following argume
```js run
let date = new Date("2017-01-26");
alert(date); // Thu Jan 26 2017 ...
alert(date);
// The time portion of the date is assumed to be midnight GMT and
// is adjusted according to the timezone the code is run in
// So the result could be
// Thu Jan 26 2017 11:00:00 GMT+1100 (Australian Eastern Daylight Time)
// or
// Wed Jan 25 2017 16:00:00 GMT-0800 (Pacific Standard Time)
```
`new Date(year, month, date, hours, minutes, seconds, ms)`