You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/05-data-types/11-date/3-weekday/task.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@ importance: 5
2
2
3
3
---
4
4
5
-
# European weekday
5
+
# Європейський робочий день
6
6
7
-
European countries have days of week starting with Monday (number 1), then Tuesday (number 2) and till Sunday (number 7). Write a function `getLocalDay(date)` that returns the "European" day of week for`date`.
7
+
Європейські країни мають дні тижня, що починаються з понеділка (№ 1), потім вівторок (№ 2) та до неділі (№ 7). Напишіть функцію `getLocalDay(date)`, що повертає "європейський" день тижня для`date`.
8
8
9
9
```js no-beautify
10
-
let date =newDate(2012, 0, 3); // 3 Jan 2012
11
-
alert( getLocalDay(date) ); //tuesday, should show 2
10
+
let date =newDate(2012, 0, 3); // 3 січня 2012
11
+
alert( getLocalDay(date) ); //вівторок, слід показати 2
Normally, dates start from 1, but technically we can pass any number, the date will autoadjust itself. So when we pass 0, then it means "one day before 1st day of the month", in other words: "the last day of the previous month".
13
+
Зазвичай дати починаються з 1, але технічно ми можемо передати будь-яке число, дата автоматично відрегулює себе. Отже, коли ми передаємо 0, то це означає "за день до 1-го дня місяця", іншими словами: "останній день попереднього місяця".
0 commit comments