DateTime.getMonth

Retrieves the month of the year represented by datetime in the Gregorian calendar.

class DateTime
int
getMonth
()

Return Value

Type: int

the month represented by datetime

Meta

Since

2.26