go语言内置time模块
improt (
"time"
"fmt"
)
func main() {
now := time.Now()
week := now.Weekday()
offset := int(time.Monday-week)
if offset > 0 {
offset = -6
}
fmt.Println(offset)
//周
StartDate := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local)
EndDates := time.Date(now.Year(), now