package main import ( "fmt" "time" ) func main() { now := time.Now() // Pretty Print. fmt.Println(now.Month()) // Integer value. fmt.Println(int(now.Month())) // Compare with a month enum constant. fmt.Println(now.Month() == time.January) }