From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- .../global_objects/date/getdate/index.html | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 files/uk/web/javascript/reference/global_objects/date/getdate/index.html (limited to 'files/uk/web/javascript/reference/global_objects/date/getdate') diff --git a/files/uk/web/javascript/reference/global_objects/date/getdate/index.html b/files/uk/web/javascript/reference/global_objects/date/getdate/index.html new file mode 100644 index 0000000000..431044f4df --- /dev/null +++ b/files/uk/web/javascript/reference/global_objects/date/getdate/index.html @@ -0,0 +1,64 @@ +--- +title: Date.prototype.getDate() +slug: Web/JavaScript/Reference/Global_Objects/Date/getDate +tags: + - Date + - JavaScript + - Довідка + - метод +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate +--- +
{{JSRef}}
+ +

Метод getDate() повертає день місяця для вказаної дати згідно з місцевим часом.

+ +
{{EmbedInteractiveExample("pages/js/date-getdate.html","shorter")}}
+ + + +

Синтаксис

+ +
dateObj.getDate()
+ +

Повертає

+ +

Ціле число між 1 та 31, що відображає день місяця для наданої дати згідно з місцевим часом.

+ +

Приклади

+ +

Використання getDate()

+ +

Друга інструкція, наведена нижче, присвоює значення 25 змінній day на основі значення об'єкта {{jsxref("Date")}} на ім'я Xmas95.

+ +
var Xmas95 = new Date('December 25, 1995 23:15:30');
+var day = Xmas95.getDate();
+
+console.log(day); // 25
+
+ +

Специфікації

+ + + + + + + + + + +
Специфікація
{{SpecName('ESDraft', '#sec-date.prototype.getdate', 'Date.prototype.getDate')}}
+ +

Сумісність з веб-переглядачами

+ + + +

{{Compat("javascript.builtins.Date.getDate")}}

+ +

Див. також

+ + -- cgit v1.2.3-54-g00ecf