]> gitweb.factorcode.org Git - factor.git/commitdiff
Use TYPED: in a few places in calendar.format to avoid passing durations instead...
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 2 Mar 2010 10:31:17 +0000 (04:31 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 2 Mar 2010 10:31:17 +0000 (04:31 -0600)
basis/calendar/format/format.factor

index 96d76d0ce86430c5e7b9badbd0502b7393f8aba8..35e364e6aafe1a746469728bddf160c2a5c25c20 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: math math.order math.parser math.functions kernel\r
-sequences io accessors arrays io.streams.string splitting\r
-combinators calendar calendar.format.macros present ;\r
+USING: accessors arrays calendar calendar.format.macros\r
+combinators io io.streams.string kernel math math.functions\r
+math.order math.parser present sequences typed ;\r
 IN: calendar.format\r
 \r
 : pad-00 ( n -- str ) number>string 2 CHAR: 0 pad-head ;\r
@@ -272,16 +272,16 @@ ERROR: invalid-timestamp-format ;
 : (timestamp>ymd) ( timestamp -- )\r
     { YYYY "-" MM "-" DD } formatted ;\r
 \r
-: timestamp>ymd ( timestamp -- str )\r
+TYPED: timestamp>ymd ( timestamp: timestamp -- str )\r
     [ (timestamp>ymd) ] with-string-writer ;\r
 \r
 : (timestamp>hms) ( timestamp -- )\r
     { hh ":" mm ":" ss } formatted ;\r
 \r
-: timestamp>hms ( timestamp -- str )\r
+TYPED: timestamp>hms ( timestamp: timestamp -- str )\r
     [ (timestamp>hms) ] with-string-writer ;\r
 \r
-: timestamp>ymdhms ( timestamp -- str )\r
+TYPED: timestamp>ymdhms ( timestamp: timestamp -- str )\r
     [\r
         >gmt\r
         { (timestamp>ymd) " " (timestamp>hms) } formatted\r