-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* date and time * Update 1-js/05-data-types/11-date/6-get-seconds-today/solution.md * Update 1-js/05-data-types/11-date/2-get-week-day/solution.md * Update 1-js/05-data-types/11-date/8-format-date-relative/solution.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md * Update 1-js/05-data-types/11-date/article.md Co-authored-by: Taras <[email protected]>
- Loading branch information
1 parent
a05ff28
commit 1ba5705
Showing
16 changed files
with
238 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
The method `date.getDay()` returns the number of the weekday, starting from sunday. | ||
Метод `date.getDay()` повертає номер робочого дня, починаючи з неділі. | ||
|
||
Let's make an array of weekdays, so that we can get the proper day name by its number: | ||
Зробімо масив буднів, щоб ми могли отримати відповідну назву дня за номером: | ||
|
||
```js run demo | ||
function getWeekDay(date) { | ||
let days = ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA']; | ||
let days = ['НД', 'ПН', 'ВТ', 'СР', 'ЧТ', 'ПТ', 'СБ']; | ||
|
||
return days[date.getDay()]; | ||
} | ||
|
||
let date = new Date(2014, 0, 3); // 3 Jan 2014 | ||
alert( getWeekDay(date) ); // FR | ||
let date = new Date(2014, 0, 3); // 3 січня 2014 | ||
alert( getWeekDay(date) ); // ПТ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.