Date returns the year, month, and day in which t occurs.
package main import ( "fmt" "time" ) func main() { d := time.Date(2000, 2, 1, 12, 30, 0, 0, time.UTC) year, month, day := d.Date() fmt.Printf("year = %v\n", year) fmt.Printf("month = %v\n", month) fmt.Printf("day = %v\n", day) }