mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
优化RangeDesc
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user