English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript getDate() Method

 JavaScript Date Object

getDate()Returns the day of the month for the specified date object according to local time (1-31).

For the day of the week, seegetDay()Method.

Syntax:

date.getDate()
var d = new Date();
d.getDate();
Test and See‹/›

Browser Compatibility

All browsers fully support the getDate() method:

Method
getDate()isisisisis

Technical Details

Return Value:1to31an integer between the two represents a specific day of the month
JavaScript Version:ECMAScript 1

More Examples

Return the date of the month from a specific date:

var d = new Date('August 20, 1999 23:15:30');
d.getDate();
Test and See‹/›

 JavaScript Date Object