Skip to content

Commit ad49621

Browse files
committed
translated task 1 to 3
1 parent ecea18c commit ad49621

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

Diff for: 1-js/05-data-types/11-date/1-new-date/solution.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
The `new Date` constructor uses the local time zone. So the only important thing to remember is that months start from zero.
1+
Constructorul `new Date` utilizează fusul orar local. Așadar singurul lucru important de reținut este că lunile încep de la zero.
22

3-
So February has number 1.
3+
Deci Februarie are numărul 1.
44

5-
Here's an example with numbers as date components:
5+
Iată un exemplu cu numere ca și componente ale datei:
66

77
```js run
8-
//new Date(year, month, date, hour, minute, second, millisecond)
8+
//new Date(an, lună, dată, oră, minut, secundă, milisecundă)
99
let d1 = new Date(2012, 1, 20, 3, 12);
1010
alert( d1 );
1111
```
12-
We could also create a date from a string, like this:
12+
Am putea de asemenea să creăm o dată dintr-un șir, în felul următor:
1313

1414
```js run
1515
//new Date(datastring)

Diff for: 1-js/05-data-types/11-date/1-new-date/task.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ importance: 5
22

33
---
44

5-
# Create a date
5+
# Creați o dată
66

7-
Create a `Date` object for the date: Feb 20, 2012, 3:12am. The time zone is local.
7+
Creați un obiect `Date` pentru data: Feb 20, 2012, 3:12am. Fusul orar este local.
88

9-
Show it using `alert`.
9+
Afișați-o folosind `alert`.

Diff for: 1-js/05-data-types/11-date/2-get-week-day/solution.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The method `date.getDay()` returns the number of the weekday, starting from sunday.
1+
Metoda `date.getDay()` returnează numărul zilei săptămânii, începând de duminică.
22

3-
Let's make an array of weekdays, so that we can get the proper day name by its number:
3+
Să creăm o matrice de zile ale săptămânii, astfel încât să putem obține numele zilei corespunzătoare prin numărul ei:
44

55
```js run demo
66
function getWeekDay(date) {

Diff for: 1-js/05-data-types/11-date/2-get-week-day/task.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ importance: 5
22

33
---
44

5-
# Show a weekday
5+
# Arată o zi a săptămânii
66

7-
Write a function `getWeekDay(date)` to show the weekday in short format: 'MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'.
7+
Scrieți o funcție `getWeekDay(date)` pentru a afișa ziua săptămânii în format scurt: 'MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'.
88

9-
For instance:
9+
De exemplu:
1010

1111
```js no-beautify
1212
let date = new Date(2012, 0, 3); // 3 Jan 2012
13-
alert( getWeekDay(date) ); // should output "TU"
13+
alert( getWeekDay(date) ); // ar trebui să iasă "TU"
1414
```

Diff for: 1-js/05-data-types/11-date/3-weekday/_js.view/solution.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function getLocalDay(date) {
22

33
let day = date.getDay();
44

5-
if (day == 0) { // weekday 0 (sunday) is 7 in european
5+
if (day == 0) { // ziua săptămânii 0 (sunday) este 7 în Europa
66
day = 7;
77
}
88

Diff for: 1-js/05-data-types/11-date/3-weekday/task.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 5
22

33
---
44

5-
# European weekday
5+
# Zi lucrătoare europeană
66

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+
Țările europene au zile ale săptămânii care încep cu Monday (numărul 1), apoi Tuesday (numărul 2) și până Sunday (numărul 7). Scrieți o funcție `getLocalDay(date)` care returnează ziua săptămânii "Europene" pentru `date`.
88

99
```js no-beautify
1010
let date = new Date(2012, 0, 3); // 3 Jan 2012
11-
alert( getLocalDay(date) ); // tuesday, should show 2
11+
alert( getLocalDay(date) ); // tuesday, ar trebui să arate 2
1212
```

0 commit comments

Comments
 (0)