]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/calendar/format/format.factor
factor: trim using lists
[factor.git] / basis / calendar / format / format.factor
index 5723594a6609f9bef493c4109521abb0939a06b8..456e6ea3930c058005b8544c279bb10510fb15ca 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays calendar calendar.english combinators
+USING: accessors calendar calendar.english combinators
 formatting grouping io io.streams.string kernel make math
-math.order math.parser math.parser.private math.ranges present
+math.order math.parser math.parser.private ranges present
 quotations sequences splitting strings words ;
 IN: calendar.format
 
@@ -77,7 +77,7 @@ M: timestamp day.
 
 : days. ( year month -- )
     [ 1 (day-of-week) dup [ "   " write ] times ]
-    [ (days-in-month) ] 2bi [1,b] [
+    [ (days-in-month) ] 2bi [1..b] [
         [ day. ] [ + 7 mod zero? [ nl ] [ bl ] if ] bi
     ] with each nl ;
 
@@ -90,7 +90,7 @@ PRIVATE>
 GENERIC: year. ( obj -- )
 
 M: integer year.
-    dup number>string 64 center. nl 12 [1,b] [
+    dup number>string 64 center. nl 12 [1..b] [
         [
             [ month-name 20 center. ]
             [ days-header. days. nl nl ] bi