Skip to content

Commit 284a9bc

Browse files
committed
translated until line 108
1 parent 13b7c92 commit 284a9bc

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,58 +54,58 @@ Pentru a crea un nou obiect `Date` apelați `new Date()` cu unul dintre următoa
5454
// Wed Jan 25 2017 16:00:00 GMT-0800 (Pacific Standard Time)
5555
```
5656

57-
`new Date(year, month, date, hours, minutes, seconds, ms)`
58-
: Create the date with the given components in the local time zone. Only the first two arguments are obligatory.
57+
`new Date(an, lună, date, ore, minute, secunde, ms)`
58+
: Creează data cu componentele date în fusul orar local. Doar primele două argumente sunt obligatorii.
5959

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.
61-
- The `month` count starts with `0` (Jan), up to `11` (Dec).
62-
- The `date` parameter is actually the day of month, if absent then `1` is assumed.
63-
- If `hours/minutes/seconds/ms` is absent, they are assumed to be equal `0`.
60+
- Anul `year` trebuie să aibă 4 cifre. Pentru compatibilitate, sunt acceptate și 2 cifre, care sunt considerate `19xx`, e.g.`98` este același lucru cu `1998` aici, dar este întotdeauna puternic încurajată folosirea a 4 cifre.
61+
- Numărătoarea "lunilor" începe cu `0` (Ian), până la `11` (Dec).
62+
- Parametrul `date` este de fapt ziua lunii, dacă nu există atunci se presupune `1`.
63+
- Dacă `ore/minute/secunde/ms` este absent, se presupune că sunt egale cu `0`.
6464

65-
For instance:
65+
De exemplu:
6666

6767
```js
6868
new Date(2011, 0, 1, 0, 0, 0, 0); // 1 Jan 2011, 00:00:00
69-
new Date(2011, 0, 1); // the same, hours etc are 0 by default
69+
new Date(2011, 0, 1); // la fel, orele etc sunt 0 în mod implicit
7070
```
7171

72-
The maximal precision is 1 ms (1/1000 sec):
72+
Precizia maximă este 1 ms (1/1000 sec):
7373

7474
```js run
7575
let date = new Date(2011, 0, 1, 2, 3, 4, 567);
7676
alert( date ); // 1.01.2011, 02:03:04.567
7777
```
7878

79-
## Access date components
79+
## Accesarea componentelor de date
8080

81-
There are methods to access the year, month and so on from the `Date` object:
81+
Există metode pentru a accesa anul, luna și așa mai departe din obiectul `Date`:
8282

8383
[getFullYear()](mdn:js/Date/getFullYear)
84-
: Get the year (4 digits)
84+
: Obține anul (4 cifre)
8585

8686
[getMonth()](mdn:js/Date/getMonth)
87-
: Get the month, **from 0 to 11**.
87+
: Obține luna, **de la 0 la 11**.
8888

8989
[getDate()](mdn:js/Date/getDate)
90-
: Get the day of month, from 1 to 31, the name of the method does look a little bit strange.
90+
: Obține ziua lunii, de la 1 la 31, numele metodei pare puțin ciudat.
9191

9292
[getHours()](mdn:js/Date/getHours), [getMinutes()](mdn:js/Date/getMinutes), [getSeconds()](mdn:js/Date/getSeconds), [getMilliseconds()](mdn:js/Date/getMilliseconds)
93-
: Get the corresponding time components.
93+
: Obține componentele de timp corespunzătoare.
9494

95-
```warn header="Not `getYear()`, but `getFullYear()`"
96-
Many JavaScript engines implement a non-standard method `getYear()`. This method is deprecated. It returns 2-digit year sometimes. Please never use it. There is `getFullYear()` for the year.
95+
```warn header="Nu `getYear()`, ci `getFullYear()`"
96+
Multe motoare JavaScript implementează o metodă non-standard `getYear()`. Această metodă este depreciată. Ea returnează uneori anul din 2 cifre. Vă rugăm să nu o folosiți niciodată. Există `getFullYear()` pentru an.
9797
```
9898
99-
Additionally, we can get a day of week:
99+
Adițional, putem obține o zi a săptămânii:
100100
101101
[getDay()](mdn:js/Date/getDay)
102-
: Get the day of week, from `0` (Sunday) to `6` (Saturday). The first day is always Sunday, in some countries that's not so, but can't be changed.
102+
: Obține ziua săptămânii, de la `0` (Duminică) la `6` (Sâmbătă). Prima zi este întotdeauna Duminică, în unele țări nu este așa, dar nu poate fi schimbată.
103103
104-
**All the methods above return the components relative to the local time zone.**
104+
**Toate metodele de mai sus returnează componentele în raport cu fusul orar local.**
105105
106-
There are also their UTC-counterparts, that return day, month, year and so on for the time zone UTC+0: [getUTCFullYear()](mdn:js/Date/getUTCFullYear), [getUTCMonth()](mdn:js/Date/getUTCMonth), [getUTCDay()](mdn:js/Date/getUTCDay). Just insert the `"UTC"` right after `"get"`.
106+
Există de asemenea omologii lor UTC, care returnează ziua, luna, anul și așa mai departe pentru fusul orar UTC+0: [getUTCFullYear()](mdn:js/Date/getUTCFullYear), [getUTCMonth()](mdn:js/Date/getUTCMonth), [getUTCDay()](mdn:js/Date/getUTCDay). Doar introduceți `"UTC"` imediat după `"get"`.
107107
108-
If your local time zone is shifted relative to UTC, then the code below shows different hours:
108+
Dacă fusul orar local este decalat față de UTC, atunci codul de mai jos afișează ore diferite:
109109
110110
```js run
111111
// current date

0 commit comments

Comments
 (0)