--- title: Date.prototype.getDate() slug: Web/JavaScript/Reference/Global_Objects/Date/getDate tags: - النموذج المبدئي - تاريخ - جافاسكربت - طريقة - مرجع translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate ---
دالة getDate()
تقوم بإرجاع يوم من تاريخ الشهر المحدد وفقاً للوقت المحلي.
dateObj.getDate()
رقم صحيح ما بين 1 و31 يمثل يوم محدد من تاريخ الشهر المحدد وفقاً للوقت المحلي.
getDate()
البيان الثاني قام بتعيين قيمة المتغير day
، علي أساس قيمة تاريخ المتغير Xmas95
.
var Xmas95 = new Date('December 25, 1995 23:15:30'); var day = Xmas95.getDate(); console.log(day); // 25
Specification | Status | Comment |
---|---|---|
{{SpecName('ESDraft', '#sec-date.prototype.getdate', 'Date.prototype.getDate')}} | {{Spec2('ESDraft')}} | |
{{SpecName('ES6', '#sec-date.prototype.getdate', 'Date.prototype.getDate')}} | {{Spec2('ES6')}} | |
{{SpecName('ES5.1', '#sec-15.9.5.14', 'Date.prototype.getDate')}} | {{Spec2('ES5.1')}} | |
{{SpecName('ES1')}} | {{Spec2('ES1')}} | Initial definition. Implemented in JavaScript 1.1. |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
{{Compat("javascript.builtins.Date.getDate")}}