|
|
@ -318,10 +318,13 @@ func (t *StarTimer) parseStaticNextDate(base time.Time, r *Repeats, recall bool)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if target.UnixNano() == base.UnixNano() && veryDay == veryMonth && veryDay == 0 {
|
|
|
|
|
|
|
|
target = target.Add(time.Hour * 24)
|
|
|
|
|
|
|
|
}
|
|
|
|
if (veryDay != 0 && target.Day() != veryDay) || (veryMonth != 0 && int(target.Month()) != veryMonth) {
|
|
|
|
if (veryDay != 0 && target.Day() != veryDay) || (veryMonth != 0 && int(target.Month()) != veryMonth) {
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if target == base && !recall {
|
|
|
|
if target.UnixNano() == base.UnixNano() && !recall {
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
targets = append(targets, target)
|
|
|
|
targets = append(targets, target)
|
|
|
@ -343,8 +346,12 @@ func (t *StarTimer) parseStaticNextDate(base time.Time, r *Repeats, recall bool)
|
|
|
|
return targets[0]
|
|
|
|
return targets[0]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nextBase := time.Date(targets[0].Year(), targets[0].Month(), targets[0].Day(), 0, 0, 0, 0, targets[0].Location())
|
|
|
|
nextBase := targets[0]
|
|
|
|
return t.parseStaticNextDate(nextBase.Add(time.Hour*24), r, true)
|
|
|
|
if nextBase == base {
|
|
|
|
|
|
|
|
nextBase = time.Date(targets[0].Year(), targets[0].Month(), targets[0].Day(), 0, 0, 0, 0, targets[0].Location())
|
|
|
|
|
|
|
|
nextBase = nextBase.Add(time.Hour * 24)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return t.parseStaticNextDate(nextBase, r, true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(targets) > 0 {
|
|
|
|
if len(targets) > 0 {
|
|
|
|