]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/crontab/crontab.factor
factor: use ??if instead of ?if-old
[factor.git] / extra / crontab / crontab.factor
index 2b14063ad3d30c235deb6a9cb2131904c4f37014..83fedc0f832417ea3b5e13d1d1c899b2dbe3eaf3 100644 (file)
@@ -23,14 +23,14 @@ ERROR: invalid-cronentry value ;
     } cond ; inline recursive
 
 : parse-day ( str -- n )
-    dup string>number [ ] [
+    [ string>number ] [
         >lower $[ day-abbreviations3 [ >lower ] map ] index
-    ] ?if ;
+    ] ?unless ;
 
 : parse-month ( str -- n )
-    dup string>number [ ] [
+    [ string>number ] [
         >lower $[ month-abbreviations [ >lower ] map ] index
-    ] ?if ;
+    ] ?unless ;
 
 TUPLE: cronentry minutes hours days months days-of-week command ;