From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- .../reference/global_objects/date/getdate/index.html | 4 ++-- .../reference/global_objects/date/getday/index.html | 6 +++--- .../reference/global_objects/date/getfullyear/index.html | 4 ++-- .../reference/global_objects/date/gethours/index.html | 4 ++-- .../global_objects/date/getmilliseconds/index.html | 4 ++-- .../reference/global_objects/date/getminutes/index.html | 4 ++-- .../reference/global_objects/date/getmonth/index.html | 4 ++-- .../reference/global_objects/date/getseconds/index.html | 4 ++-- .../reference/global_objects/date/gettime/index.html | 6 +++--- .../javascript/reference/global_objects/date/index.html | 14 +++++++------- 10 files changed, 27 insertions(+), 27 deletions(-) (limited to 'files/ru/web/javascript/reference/global_objects/date') diff --git a/files/ru/web/javascript/reference/global_objects/date/getdate/index.html b/files/ru/web/javascript/reference/global_objects/date/getdate/index.html index 52e0d9eefa..9c6667995c 100644 --- a/files/ru/web/javascript/reference/global_objects/date/getdate/index.html +++ b/files/ru/web/javascript/reference/global_objects/date/getdate/index.html @@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate

Синтаксис

-
dateObj.getDate()
+
dateObj.getDate()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate

Вторая инструкция в примере ниже присваивает значение 25 переменной day из значения объекта {{jsxref("Global_Objects/Date", "Date")}} date.

-
let date = new Date('December 25, 1995 23:15:30');
+
let date = new Date('December 25, 1995 23:15:30');
 let day = date.getDate();
 
 console.log(day); // 25
diff --git a/files/ru/web/javascript/reference/global_objects/date/getday/index.html b/files/ru/web/javascript/reference/global_objects/date/getday/index.html
index 654e43455f..c2c2bd4e8a 100644
--- a/files/ru/web/javascript/reference/global_objects/date/getday/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/getday/index.html
@@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay
 
 

Синтаксис

-
dateObj.getDay()
+
dateObj.getDay()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay

Вторая инструкция в примере ниже присваивает значение 1 переменной weekday из значения объекта {{jsxref("Global_Objects/Date", "Date")}} date. 25 декабря 1995 года было понедельником.

-
let date = new Date('December 25, 1995 23:15:30');
+
let date = new Date('December 25, 1995 23:15:30');
 let weekday = date.getDay();
 
 console.log(weekday); // 1
@@ -42,7 +42,7 @@ console.log(weekday); // 1
 

Примечание: При необходимости полное название дня (например, "Понедельник") можно получить, используя {{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}} с параметром options parameter. С помощью этого метода упрощается интернационализация:

-
let options = { weekday: 'long'};
+
let options = { weekday: 'long'};
 
 console.log(new Intl.DateTimeFormat('en-US', options).format(date));
 // Monday
diff --git a/files/ru/web/javascript/reference/global_objects/date/getfullyear/index.html b/files/ru/web/javascript/reference/global_objects/date/getfullyear/index.html
index 5a7d09c7bf..60aeb1a1ac 100644
--- a/files/ru/web/javascript/reference/global_objects/date/getfullyear/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/getfullyear/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getFullYear
 
 

Синтаксис

-
dateObj.getFullYear()
+
dateObj.getFullYear()

Параметры

@@ -35,7 +35,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getFullYear

В следующем примере переменной year присваивается четырёхзначное значение текущего года.

-
let today = new Date(); // Mon Nov 23 2020 15:23:46 GMT+0300 (Москва, стандартное время)
+
let today = new Date(); // Mon Nov 23 2020 15:23:46 GMT+0300 (Москва, стандартное время)
 let year = today.getFullYear(); // 2020
 
diff --git a/files/ru/web/javascript/reference/global_objects/date/gethours/index.html b/files/ru/web/javascript/reference/global_objects/date/gethours/index.html index 4e927a3454..2f0c788d1a 100644 --- a/files/ru/web/javascript/reference/global_objects/date/gethours/index.html +++ b/files/ru/web/javascript/reference/global_objects/date/gethours/index.html @@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getHours

Синтаксис

-
dateObj.getHours()
+
dateObj.getHours()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getHours

Вторая инструкция в примере ниже присваивает значение 23 переменной hours из значения объекта {{jsxref("Global_Objects/Date", "Date")}} date.

-
let date = new Date('December 25, 1995 23:15:30');
+
let date = new Date('December 25, 1995 23:15:30');
 let hours = date.getHours();
 
 console.log(hours); // 23
diff --git a/files/ru/web/javascript/reference/global_objects/date/getmilliseconds/index.html b/files/ru/web/javascript/reference/global_objects/date/getmilliseconds/index.html
index 4d848fc5e8..3d9d51b204 100644
--- a/files/ru/web/javascript/reference/global_objects/date/getmilliseconds/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/getmilliseconds/index.html
@@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds
 
 

Синтаксис

-
dateObj.getMilliseconds()
+
dateObj.getMilliseconds()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds

В следующем примере переменной milliseconds присваиваются миллисекунды текущего времени:

-
let today = new Date();
+
let today = new Date();
 let milliseconds = today.getMilliseconds();
 
 console.log(milliseconds); // 709
diff --git a/files/ru/web/javascript/reference/global_objects/date/getminutes/index.html b/files/ru/web/javascript/reference/global_objects/date/getminutes/index.html
index 533cba2dc5..0b97f5e1f7 100644
--- a/files/ru/web/javascript/reference/global_objects/date/getminutes/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/getminutes/index.html
@@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes
 
 

Синтаксис

-
dateObj.getMinutes()
+
dateObj.getMinutes()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes

Вторая инструкция в примере ниже присваивает значение 15 переменной minutes из значения объекта {{jsxref("Global_Objects/Date", "Date")}} date.

-
let date = new Date('December 25, 1995 23:15:30');
+
let date = new Date('December 25, 1995 23:15:30');
 let minutes = date.getMinutes();
 
 console.log(minutes); // 15
diff --git a/files/ru/web/javascript/reference/global_objects/date/getmonth/index.html b/files/ru/web/javascript/reference/global_objects/date/getmonth/index.html
index 5b42ea933a..001f258a2c 100644
--- a/files/ru/web/javascript/reference/global_objects/date/getmonth/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/getmonth/index.html
@@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMonth
 
 

Синтаксис

-
dateObj.getMonth()
+
dateObj.getMonth()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMonth

Вторая инструкция в примере ниже присваивает значение 11 переменной month из значения переменной date объекта {{jsxref("Global_Objects/Date", "Date")}}.

-
let date = new Date('December 25, 1995 23:15:30');
+
let date = new Date('December 25, 1995 23:15:30');
 let month = date.getMonth();
 
 console.log(month); // 11
diff --git a/files/ru/web/javascript/reference/global_objects/date/getseconds/index.html b/files/ru/web/javascript/reference/global_objects/date/getseconds/index.html
index 6027da393b..e2e5fecaac 100644
--- a/files/ru/web/javascript/reference/global_objects/date/getseconds/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/getseconds/index.html
@@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds
 
 

Синтаксис

-
dateObj.getSeconds()
+
dateObj.getSeconds()

Параметры

@@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds

Вторая инструкция в примере ниже присваивает значение 30 переменной seconds из значения переменной date объекта {{jsxref("Global_Objects/Date", "Date")}}.

-
let date = new Date('December 25, 1995 23:15:30');
+
let date = new Date('December 25, 1995 23:15:30');
 let seconds = date.getSeconds();
 
 console.log(seconds); // 30
diff --git a/files/ru/web/javascript/reference/global_objects/date/gettime/index.html b/files/ru/web/javascript/reference/global_objects/date/gettime/index.html
index 8f380c6208..f4b2c740b6 100644
--- a/files/ru/web/javascript/reference/global_objects/date/gettime/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/gettime/index.html
@@ -23,7 +23,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getTime
 
 

Синтаксис

-
dateObj.getTime()
+
dateObj.getTime()

Параметры

@@ -39,7 +39,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getTime

Конструирует новый объект даты с идентичным значением времени.

-
let birthday = new Date(2020, 12, 20);
+
let birthday = new Date(2020, 12, 20);
 let copy = new Date();
 copy.setTime(birthday.getTime());
 
@@ -50,7 +50,7 @@ console.log(copy.setTime(birthday.getTime())); // 1611090000000
 
 

Вычитанием двух последовательных вызовов метода getTime() на заново сконструированных объектах {{jsxref("Global_Objects/Date", "Date")}} можно замерить промежуток времени, произошедший между двумя этими вызовами. Это можно использовать для вычисления времени выполнения неких операций.

-
let end, start;
+
let end, start;
 
 start = new Date();
 for (let i = 0; i < 1000; i++) {
diff --git a/files/ru/web/javascript/reference/global_objects/date/index.html b/files/ru/web/javascript/reference/global_objects/date/index.html
index bf3ce884dd..0f8ddf6b79 100644
--- a/files/ru/web/javascript/reference/global_objects/date/index.html
+++ b/files/ru/web/javascript/reference/global_objects/date/index.html
@@ -24,7 +24,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date
 
 

Синтаксис

-
new Date();
+
new Date();
 new Date(value);
 new Date(dateString);
 new Date(year, month[, day[, hour[, minute[, second[, millisecond]]]]]);
@@ -118,7 +118,7 @@ new Date(year, month[, day[, hour[,
 

Обратите внимание: разбор строкового представления дат с помощью конструктора Date (так же как эквивалентный ему метод Date.parse) может иметь различия и несоответствия в браузерах.

-
var today = new Date();
+
var today = new Date();
 var birthday = new Date('December 17, 1995 03:24:00');
 var birthday = new Date('1995-12-17T03:24:00');
 var birthday = new Date(1995, 11, 17);
@@ -129,7 +129,7 @@ var birthday = new Date(1995, 11, 17, 3, 24, 0);
 
 

Для того, чтобы создать и получить даты между 0 и 99 годом, нужно использовать методы {{jsxref("Date.prototype.setFullYear()")}} и {{jsxref("Date.prototype.getFullYear()")}}.

-
var date = new Date(98, 1); // Sun Feb 01 1998 00:00:00 GMT+0000 (GMT)
+
var date = new Date(98, 1); // Sun Feb 01 1998 00:00:00 GMT+0000 (GMT)
 
 // Устаревший метод, 98 отображается на 1998 год
 date.setYear(98);           // Sun Feb 01 1998 00:00:00 GMT+0000 (GMT)
@@ -141,7 +141,7 @@ date.setFullYear(98);       // Sat Feb 01 0098 00:00:00 GMT+0000 (BST)
 
 

Следующие примеры показывают, как определить разницу во времени между двумя датами в JavaScript:

-
// Используя объекты Date
+
// Используя объекты Date
 var start = Date.now();
 
 // Событие, для которого замеряется время, происходит тут:
@@ -150,7 +150,7 @@ var end = Date.now();
 var elapsed = end - start; // затраченное время в миллисекундах
 
-
// Используя встроенные методы
+
// Используя встроенные методы
 var start = new Date();
 
 // Событие, для которого замеряется время, происходит тут:
@@ -159,7 +159,7 @@ var end = new Date();
 var elapsed = end.getTime() - start.getTime(); // затраченное время в миллисекундах
 
-
// Проверяет функцию и возвращает её возвращаемое значение
+
// Проверяет функцию и возвращает её возвращаемое значение
 function printElapsedTime(fTest) {
   var nStartTime = Date.now(),
       vReturn = fTest(),
@@ -179,7 +179,7 @@ yourFunctionReturn = printElapsedTime(yourFunction);
 
 

Получить количество секунд с начала эпохи Unix

-
var seconds = Math.floor(Date.now() / 1000);
+
var seconds = Math.floor(Date.now() / 1000);

В этом случае важно возвращать только целое число (так что простое деление не подойдёт), а также возвращать только фактически прошедшие секунды (поэтому этот код использует {{jsxref ("Math.floor ()")}} а не {{jsxref ("Math.round ()")}}).

-- cgit v1.2.3-54-g00ecf