Compare only date part ot time.Time in Golang
You can either truncate the time to the day: t1.Truncate(24*time.Hour).Equal(t2.Truncate(24*time.Hour)) Or you can compare the year and day separately: t1.Year() == t2.Year() && t1.YearDay() == t2.YearDay()