Standard library / time
time.Time.Month()
Return the calendar month as a time.Month value. Expected stdout: 'February\n'.
Formal Syntax & Structure
go syntaxgo
func (t Time) Month() MonthReturn Value
Month
Return the calendar month as a time.Month value.
Working Example
Example Snippetgo
package main
import ( "fmt" "time")
func fixed() time.Time { return time.Date(2024, 2, 29, 12, 34, 56, 123000000, time.UTC) }func main() { fmt.Println(fixed().Month()) }