Documentation ¶
Index ¶
- func CheckTimeByTimeN2(prevAt carbon.Carbon, checkAt carbon.Carbon, timeType int, timeN []int64) bool
- func GetTimeByTimeN2(addTime carbon.Carbon, timeType int, timeN []int64) (carbon.Carbon, bool)
- func GetTimeByTimeN2Now(addTime carbon.Carbon, timeType int, timeN []int64) (carbon.Carbon, bool)
- func MakeBeforeAt(timeType int, timeN []int64, skipHoliday bool, nextAt carbon.Carbon) (newTime carbon.Carbon, needDeleteConfig bool, b bool)
- func MakeNextAt(timeType int, timeN []int64, skipHoliday bool, nextAt carbon.Carbon) (newTime carbon.Carbon, needDeleteConfig bool, b bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTimeByTimeN2 ¶
func CheckTimeByTimeN2(prevAt carbon.Carbon, checkAt carbon.Carbon, timeType int, timeN []int64) bool
CheckTimeByTimeN2 规范的时间周期长度检查 检查当前时间是否符合条件 prevTime 上次检查时间,一般存在配置内,方便计算下一次执行时间差异 addTime 要计算的时间,默认为当前时间 timeType 时间类型 0 每天重复 day / 1 每周重复 week / 2 每月重复 month / 3 临时1次 once / 4 每隔N天重复 day_n / 5 每隔N周重复 week_n / 6 每隔N月重复 month_n / 7 每个星期N重复 week_n / 8 每隔N小时重复 hour_n timeN 扩展N
重复时间内,数组的第一个值作为相隔N; 重复周内,数组代表指定的星期1-7
func GetTimeByTimeN2 ¶
GetTimeByTimeN2 规范的时间周期长度 制定高级别的时间周期设计,计算出下一次检查创建的时间
func GetTimeByTimeN2Now ¶
GetTimeByTimeN2Now 递归处理直到时间抵达今日
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.