Skip to content

Commit 13b7c92

Browse files
committed
translated until line 56
1 parent 4857420 commit 13b7c92

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
# Date and time
1+
# Data și ora
22

3-
Let's meet a new built-in object: [Date](mdn:js/Date). It stores the date, time and provides methods for date/time management.
3+
Să cunoaștem un nou obiect încorporat: [Date](mdn:js/Date). Acesta stochează data, ora și oferă metode de administrare a datei/orei.
44

5-
For instance, we can use it to store creation/modification times, to measure time, or just to print out the current date.
5+
De exemplu, îl putem utiliza pentru a stoca timpul de creare/modificare, pentru a măsura timpul, sau pur și simplu pentru a imprima data curentă.
66

7-
## Creation
7+
## Creare
88

9-
To create a new `Date` object call `new Date()` with one of the following arguments:
9+
Pentru a crea un nou obiect `Date` apelați `new Date()` cu unul dintre următoarele argumente:
1010

1111
`new Date()`
12-
: Without arguments -- create a `Date` object for the current date and time:
12+
: Fără argumente -- creează un obiect `Date` pentru data și ora curentă:
1313

1414
```js run
1515
let now = new Date();
16-
alert( now ); // shows current date/time
16+
alert( now ); // afișează data/ora curentă
1717
```
1818

19-
`new Date(milliseconds)`
20-
: Create a `Date` object with the time equal to number of milliseconds (1/1000 of a second) passed after the Jan 1st of 1970 UTC+0.
19+
`new Date(milisecunde)`
20+
: Creează un obiect `Date` cu timpul egal cu numărul de milisecunde (1/1000 dintr-o secundă) care au trecut de la 1 ianuarie 1970 UTC+0.
2121

2222
```js run
23-
// 0 means 01.01.1970 UTC+0
23+
// 0 înseamnă 01.01.1970 UTC+0
2424
let Jan01_1970 = new Date(0);
2525
alert( Jan01_1970 );
2626

27-
// now add 24 hours, get 02.01.1970 UTC+0
27+
// acum adaugă 24 de ore, get 02.01.1970 UTC+0
2828
let Jan02_1970 = new Date(24 * 3600 * 1000);
2929
alert( Jan02_1970 );
3030
```
3131

32-
An integer number representing the number of milliseconds that has passed since the beginning of 1970 is called a *timestamp*.
32+
Un număr întreg care reprezintă numărul de milisecunde care au trecut de la începutul anului 1970 se numește *timestamp*.
3333

34-
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).
34+
Este o reprezentare numerică ușoară a unei date. Putem oricând să creăm o dată dintr-un timestamp folosind `new Date(timestamp)` și să convertim obiectul `Date` existent într-un timestamp folosind metoda `date.getTime()` (a se vedea mai jos).
3535

36-
Dates before 01.01.1970 have negative timestamps, e.g.:
36+
Datele anterioare 01.01.1970 au timestamp-uri negative, e.g.:
3737
```js run
3838
// 31 Dec 1969
3939
let Dec31_1969 = new Date(-24 * 3600 * 1000);
4040
alert( Dec31_1969 );
4141
```
4242

43-
`new Date(datestring)`
44-
: 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.
43+
`new Date(șir de date)`
44+
: Dacă există un singur argument, și acesta este un șir de caractere, atunci acesta este parsat automat. Algoritmul este același pe care îl folosește `Date.parse`, îl vom acoperi mai târziu.
4545

4646
```js run
4747
let date = new Date("2017-01-26");
4848
alert(date);
49-
// The time is not set, so it's assumed to be midnight GMT and
50-
// is adjusted according to the timezone the code is run in
51-
// So the result could be
49+
// Ora nu este setată, așa că se presupune că este miezul nopții GMT și
50+
// este ajustată în funcție de fusul orar în care este rulat codul
51+
// Astfel rezultatul ar putea fi
5252
// Thu Jan 26 2017 11:00:00 GMT+1100 (Australian Eastern Daylight Time)
53-
// or
53+
// sau
5454
// Wed Jan 25 2017 16:00:00 GMT-0800 (Pacific Standard Time)
5555
```
5656

0 commit comments

Comments
 (0)