Easy Tutorial
❮ Met Document Getelementsbyclassname Met Canvas Ispointinpath ❯

JavaScript getDate() Method

JavaScript Date Object

Example

Returns the day of the month:

n Output result:


Definition and Usage

The getDate() method returns the day of the month.


Browser Support

All major browsers support the getDate() method.


Syntax

Return Value

Type Description
Number The day of the month for the specified date according to local time. The value is an integer between 1 and 31.

Technical Details

| JavaScript Version: | 1.1 | | --- | --- |


More Examples

Example

Returns the day of the month for a specified date:

Output result:


JavaScript Date Object

❮ Met Document Getelementsbyclassname Met Canvas Ispointinpath ❯