]> gitweb.factorcode.org Git - factor.git/commitdiff
remove >r r>
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 29 Nov 2008 19:40:48 +0000 (13:40 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 29 Nov 2008 19:40:48 +0000 (13:40 -0600)
basis/calendar/format/format.factor

index b15da4240998ddd4ffeca4b9dbba53a347ec4a7c..8d34e8a3a4ee15dc76dc74d109227bd5ba4644b1 100644 (file)
@@ -138,11 +138,11 @@ M: timestamp year. ( timestamp -- )
 \r
 : read-rfc3339-gmt-offset ( ch -- dt )\r
     dup CHAR: Z = [ drop instant ] [\r
-        >r\r
-        read-00 hours\r
-        read1 { { CHAR: : [ read-00 ] } { f [ 0 ] } } case minutes\r
-        time+\r
-        r> signed-gmt-offset\r
+        [\r
+            read-00 hours\r
+            read1 { { CHAR: : [ read-00 ] } { f [ 0 ] } } case minutes\r
+            time+\r
+        ] dip signed-gmt-offset\r
     ] if ;\r
 \r
 : read-ymd ( -- y m d )\r
@@ -152,8 +152,9 @@ M: timestamp year. ( timestamp -- )
     read-00 ":" expect read-00 ":" expect read-00 ;\r
 \r
 : read-rfc3339-seconds ( s -- s' ch )\r
-    "+-Z" read-until >r\r
-    [ string>number ] [ length 10 swap ^ ] bi / + r> ;\r
+    "+-Z" read-until [\r
+        [ string>number ] [ length 10 swap ^ ] bi / +\r
+    ] dip ;\r
 \r
 : (rfc3339>timestamp) ( -- timestamp )\r
     read-ymd\r
@@ -181,9 +182,9 @@ ERROR: invalid-timestamp-format ;
 \r
 : parse-rfc822-gmt-offset ( string -- dt )\r
     dup "GMT" = [ drop instant ] [\r
-        unclip >r\r
-        2 cut [ string>number ] bi@ [ hours ] [ minutes ] bi* time+\r
-        r> signed-gmt-offset\r
+        unclip \r
+            2 cut [ string>number ] bi@ [ hours ] [ minutes ] bi* time+\r
+        ] dip signed-gmt-offset\r
     ] if ;\r
 \r
 : (rfc822>timestamp) ( -- timestamp )\r