235
}
236
237
>
checkRanges(scs.Second, "Second", 0, 59)
spec.go
238
>
checkRanges(scs.Minute, "Minute", 0, 59)
239
>
checkRanges(scs.Hour, "Hour", 0, 23)
240
>
checkRanges(scs.DayOfMonth, "DayOfMonth", 1, 31)
241
>
checkRanges(scs.Month, "Month", 1, 12)
242
>
checkRanges(scs.Year, "Year", minCalendarYear, maxCalendarYear)
243
>
checkRanges(scs.DayOfWeek, "DayOfWeek", 0, 6)
244
>
245
>
if len(scs.Comment) > maxCommentLen {
246
errs = append(errs, "comment is too long")
247
}
248
250
return errors.New("invalid calendar spec: " + strings.Join(errs, ", "))
251
}
253
}
254