crontab: simplify logic max days of month.

windows-drag
John Benediktsson 2019-03-24 15:41:19 -07:00
parent 6e1d23a931
commit 2bb6e58eb0
1 changed files with 3 additions and 4 deletions

View File

@ -50,10 +50,9 @@ CONSTANT: aliases H{
[ days-of-week>> [ 0 6 between? ] all? ]
[ months>> [ 1 12 between? ] all? ]
[
[ days>> 1 ] [ months>> ] bi
dup { 2 } sequence= [ drop 29 ] [
[ day-counts nth ] map supremum
] if [ between? ] 2curry all?
[ days>> 1 ] [ months>> ] bi [
{ 0 31 29 31 30 31 30 31 31 30 31 30 31 } nth
] map supremum [ between? ] 2curry all?
]
[ minutes>> [ 0 59 between? ] all? ]
[ hours>> [ 0 23 between? ] all? ]