标准库中没有定义 time.Date 对象。只有 time.Time 对象。也没有办法对它们进行范围循环,但是手动循环它们非常简单:// set the starting date (in any way you wish)start, err := time.Parse("2006-1-2", "2016-4-1")// handle error// set d to starting date and keep adding 1 day to it as long as month doesn't changefor d := start; d.Month() == start.Month(); d = d.AddDate(0, 0, 1) { // do stuff with d}