优化RangeDesc

This commit is contained in:
injoyai
2025-02-28 10:36:13 +08:00
parent 8a63c2ff2e
commit 81f2ffcbea

View File

@@ -114,9 +114,6 @@ func (this *Workday) TodayIs() bool {
func (this *Workday) RangeDesc(f func(t time.Time) bool) {
t := IntegerDay(time.Now())
for ; t.Before(time.Date(1990, 12, 1, 0, 0, 0, 0, time.Local)); t = t.Add(-time.Hour * 24) {
if t.Weekday() == time.Saturday || t.Weekday() == time.Sunday {
continue
}
if this.Is(t) {
if !f(t) {
return