Returns the month number from a given date.
The date object to extract the month from.
Month number (1-12).
getMonth(new Date(2025, 6, 23)); // 7 (July) Copy
getMonth(new Date(2025, 6, 23)); // 7 (July)
Returns the month number from a given date.