Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
179
rated 0 times [  186] [ 7]  / answers: 1 / hits: 99422  / 12 Years ago, thu, october 11, 2012, 12:00:00

I need to get the day of the month from a Date object but it seems that the getDay() method returns the day of the week. Is there a function that returns the day of the month?


More From » javascript

 Answers
57

Use date_object.getDate() to get the month day.



From the MDN docs link:




Returns the day of the month for the specified date according to local time.



[#82606] Wednesday, October 10, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leog

Total Points: 225
Total Questions: 113
Total Answers: 118

Location: Oman
Member since Wed, Apr 12, 2023
1 Year ago
;