Skip to content

Commit 4857420

Browse files
committed
main sync
1 parent 8fbebd4 commit 4857420

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To create a new `Date` object call `new Date()` with one of the following argume
5757
`new Date(year, month, date, hours, minutes, seconds, ms)`
5858
: Create the date with the given components in the local time zone. Only the first two arguments are obligatory.
5959

60-
- The `year` must have 4 digits: `2013` is okay, `98` is not.
60+
- The `year` should have 4 digits. For compatibility, 2 digits are also accepted and considered `19xx`, e.g. `98` is the same as `1998` here, but always using 4 digits is strongly encouraged.
6161
- The `month` count starts with `0` (Jan), up to `11` (Dec).
6262
- The `date` parameter is actually the day of month, if absent then `1` is assumed.
6363
- If `hours/minutes/seconds/ms` is absent, they are assumed to be equal `0`.
@@ -376,7 +376,7 @@ for (let i = 0; i < 10; i++) {
376376
```warn header="Be careful doing microbenchmarking"
377377
Modern JavaScript engines perform many optimizations. They may tweak results of "artificial tests" compared to "normal usage", especially when we benchmark something very small, such as how an operator works, or a built-in function. So if you seriously want to understand performance, then please study how the JavaScript engine works. And then you probably won't need microbenchmarks at all.
378378

379-
The great pack of articles about V8 can be found at <http://mrale.ph>.
379+
The great pack of articles about V8 can be found at <https://mrale.ph>.
380380
```
381381

382382
## Date.parse from a string
@@ -407,7 +407,7 @@ We can instantly create a `new Date` object from the timestamp:
407407
```js run
408408
let date = new Date( Date.parse('2012-01-26T13:51:50.417-07:00') );
409409

410-
alert(date);
410+
alert(date);
411411
```
412412

413413
## Summary

0 commit comments

Comments
 (0)