In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Month() function in Go language is used to find the month of the year as provided by t. Moreover, this function is defined under the time package. Here, you need to import the “time” package in order to use these functions.
func (t Time) Month() Month
Here, “t” is the stated time.
Return value: It returns the month of the year as provided by “t”.
The stated month of the year specified is: June
The stated month of the year specified is: November
Here, the month stated in the above code in an integer is out of usual range but it is normalized while conversion.