Skip to content

Commit 3c5ff39

Browse files
authored
Merge pull request #701 from jesse-bonzo/jesse-bonzo-patch-1
Update date parse example
2 parents e62dfd5 + 8b9fd54 commit 3c5ff39

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

1-js/05-data-types/10-date/article.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ To create a new `Date` object call `new Date()` with one of the following argume
3939

4040
```js run
4141
let date = new Date("2017-01-26");
42-
alert(date); // Thu Jan 26 2017 ...
42+
alert(date);
43+
// The time portion of the date is assumed to be midnight GMT and
44+
// is adjusted according to the timezone the code is run in
45+
// So the result could be
46+
// Thu Jan 26 2017 11:00:00 GMT+1100 (Australian Eastern Daylight Time)
47+
// or
48+
// Wed Jan 25 2017 16:00:00 GMT-0800 (Pacific Standard Time)
4349
```
4450

4551
`new Date(year, month, date, hours, minutes, seconds, ms)`

0 commit comments

Comments
 (0)