Return the day of the month:
The result of n will be:
More "Try it Yourself" examples below.
The getDate() method returns the day of the month (from 1 to 31) for the specified date.
Method | |||||
---|---|---|---|---|---|
getDate() | Yes | Yes | Yes | Yes | Yes |
None |
Return Value: | A Number, from 1 to 31, representing the day of the month |
---|---|
JavaScript Version: | 1.1 |
Return the day of the month from a specific date:
The result of n will be: