]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "calendar.format: change to use formatting instead of math.parser.private."
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 24 Sep 2014 14:42:45 +0000 (07:42 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 24 Sep 2014 14:42:45 +0000 (07:42 -0700)
This reverts commit 3cfac7916a4d3708f231875ade0cd5e586ec43e6.

basis/calendar/format/format.factor

index 837e43a64c5e0bae7564792e53f3de349abf5af0..774d8121a6eee36b668255e02b3f17d4cd385bcc 100644 (file)
@@ -1,8 +1,9 @@
 ! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays calendar calendar.format.macros
-combinators formatting io io.streams.string kernel math
-math.functions math.order math.parser present sequences typed ;
+combinators io io.streams.string kernel math math.functions
+math.order math.parser math.parser.private present sequences
+typed ;
 IN: calendar.format
 
 : pad-00 ( n -- str ) number>string 2 CHAR: 0 pad-head ;
@@ -137,7 +138,7 @@ M: timestamp year. ( timestamp -- )
 ! algorithm to detect infinite decimals (e.g 1/3)
 : write-rfc3339-seconds ( timestamp -- )
     second>> 1 mod [
-        "%.6f" sprintf [ CHAR: 0 = ] trim
+        >float "%.6f" format-float [ CHAR: 0 = ] trim
         dup length 1 > [ write ] [ drop ] if
     ] unless-zero ;