]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/calendar/format/format.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / calendar / format / format.factor
index a187f0c9af75abb42270d4adcb6ef077c2519780..6aa4126ff920f913ea4a7cd3e7b986793020c122 100644 (file)
@@ -68,8 +68,8 @@ M: array month. ( pair -- )
     [ (days-in-month) day-abbreviations2 " " join print ] 2tri\r
     over "   " <repetition> concat write\r
     [\r
-        [ 1+ day. ] keep\r
-        1+ + 7 mod zero? [ nl ] [ bl ] if\r
+        [ 1 + day. ] keep\r
+        1 + + 7 mod zero? [ nl ] [ bl ] if\r
     ] with each nl ;\r
 \r
 M: timestamp month. ( timestamp -- )\r
@@ -78,7 +78,7 @@ M: timestamp month. ( timestamp -- )
 GENERIC: year. ( obj -- )\r
 \r
 M: integer year. ( n -- )\r
-    12 [ 1+ 2array month. nl ] with each ;\r
+    12 [ 1 + 2array month. nl ] with each ;\r
 \r
 M: timestamp year. ( timestamp -- )\r
     year>> year. ;\r
@@ -201,7 +201,7 @@ ERROR: invalid-timestamp-format ;
         "," read-token day-abbreviations3 member? check-timestamp drop\r
         read1 CHAR: \s assert=\r
         read-sp checked-number >>day\r
-        read-sp month-abbreviations index 1+ check-timestamp >>month\r
+        read-sp month-abbreviations index 1 + check-timestamp >>month\r
         read-sp checked-number >>year\r
         ":" read-token checked-number >>hour\r
         ":" read-token checked-number >>minute\r
@@ -220,7 +220,7 @@ ERROR: invalid-timestamp-format ;
         "," read-token check-day-name\r
         read1 CHAR: \s assert=\r
         "-" read-token checked-number >>day\r
-        "-" read-token month-abbreviations index 1+ check-timestamp >>month\r
+        "-" read-token month-abbreviations index 1 + check-timestamp >>month\r
         read-sp checked-number >>year\r
         ":" read-token checked-number >>hour\r
         ":" read-token checked-number >>minute\r
@@ -233,7 +233,7 @@ ERROR: invalid-timestamp-format ;
 : (cookie-string>timestamp-2) ( -- timestamp )\r
     timestamp new\r
         read-sp check-day-name\r
-        read-sp month-abbreviations index 1+ check-timestamp >>month\r
+        read-sp month-abbreviations index 1 + check-timestamp >>month\r
         read-sp checked-number >>day\r
         ":" read-token checked-number >>hour\r
         ":" read-token checked-number >>minute\r