]> gitweb.factorcode.org Git - factor.git/commitdiff
calendar: rename convert-timezone back.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 11 Dec 2020 02:06:01 +0000 (18:06 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 11 Dec 2020 02:06:01 +0000 (18:06 -0800)
basis/calendar/calendar-docs.factor
basis/calendar/calendar.factor

index ae3ce64c126cdbcd8ae635da446f71b39016c68b..904e788ce3d8c531d83a81da023f955338f7d913 100644 (file)
@@ -259,12 +259,12 @@ HELP: time-
     }
 } ;
 
-HELP: convert-timezone!
+HELP: convert-timezone
 { $values { "timestamp" timestamp } { "duration" duration } }
 { $description "Converts the " { $snippet "timestamp" } "'s " { $snippet "gmt-offset" } " to the GMT offset represented by the " { $snippet "duration" } "." }
 { $examples
     { $example "USING: accessors calendar prettyprint ;"
-               "gmt noon instant -5 >>hour convert-timezone! gmt-offset>> hour>> ."
+               "gmt noon instant -5 >>hour convert-timezone gmt-offset>> hour>> ."
                "-5"
     }
 } ;
@@ -504,7 +504,7 @@ ARTICLE: "calendar" "Calendar"
 { $subsections
     >local-time
     >gmt
-    convert-timezone!
+    convert-timezone
 }
 "Timestamps relative to each other:"
 { $subsections "relative-timestamps" }
index b0db381ac5d03b52548fcbb8af5d2b18c36ec607..0752750f961c1d8b3a23158f4812cc69ed9dc8ff 100644 (file)
@@ -309,17 +309,17 @@ M: duration <=> [ duration>years ] compare ;
 
 DEFER: time-
 
-: convert-timezone! ( timestamp duration -- timestamp )
+: convert-timezone ( timestamp duration -- timestamp )
     [ over gmt-offset>> time- (time+) drop ] [ >>gmt-offset ] bi ;
 
 : >local-time! ( timestamp -- timestamp )
-    gmt-offset-duration convert-timezone! ;
+    gmt-offset-duration convert-timezone ;
 
 : >local-time ( timestamp -- timestamp' )
     clone >local-time! ;
 
 : >gmt! ( timestamp -- timestamp )
-    instant convert-timezone! ;
+    instant convert-timezone ;
 
 : >gmt ( timestamp -- timestamp' )
     clone >gmt! ;