From ecd93e97b31c09f4052bf678f010e2660426e26f Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 6 Nov 2019 20:28:04 +0300 Subject: [PATCH] fixes --- 1-js/05-data-types/11-date/article.md | 7 +++++++ 2-ui/3-event-details/1-mouse-events-basics/article.md | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/1-js/05-data-types/11-date/article.md b/1-js/05-data-types/11-date/article.md index 4cf4c88b..6f52a0d7 100644 --- a/1-js/05-data-types/11-date/article.md +++ b/1-js/05-data-types/11-date/article.md @@ -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. diff --git a/2-ui/3-event-details/1-mouse-events-basics/article.md b/2-ui/3-event-details/1-mouse-events-basics/article.md index 05b03e16..412c4007 100644 --- a/2-ui/3-event-details/1-mouse-events-basics/article.md +++ b/2-ui/3-event-details/1-mouse-events-basics/article.md @@ -21,6 +21,9 @@ The most used simple events are: `mousemove` : Every mouse move over an element triggers that event. +`contextmenu` +: Triggers when opening a context menu is attempted. In the most common case, that happens when the right mouse button is pressed. Although, there are other ways to open a context menu, e.g. using a special keyboard key, so it's not exactly the mouse event. + ...There are several other event types too, we'll cover them later. ### Complex events @@ -28,9 +31,6 @@ The most used simple events are: `click` : Triggers after `mousedown` and then `mouseup` over the same element if the left mouse button was used. -`contextmenu` -: Triggers after `mousedown` if the right mouse button was used. - `dblclick` : Triggers after a double click over an element.