calendar.format now depends on present instead of the other way around
parent
6edb771d05
commit
ba6f63ff56
|
@ -1,7 +1,8 @@
|
||||||
USING: math math.order math.parser math.functions kernel sequences io
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
accessors arrays io.streams.string splitting
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
combinators accessors debugger
|
USING: math math.order math.parser math.functions kernel
|
||||||
calendar calendar.format.macros ;
|
sequences io accessors arrays io.streams.string splitting
|
||||||
|
combinators accessors calendar calendar.format.macros present ;
|
||||||
IN: calendar.format
|
IN: calendar.format
|
||||||
|
|
||||||
: pad-00 ( n -- str ) number>string 2 CHAR: 0 pad-left ;
|
: pad-00 ( n -- str ) number>string 2 CHAR: 0 pad-left ;
|
||||||
|
@ -288,3 +289,5 @@ ERROR: invalid-timestamp-format ;
|
||||||
]
|
]
|
||||||
} formatted
|
} formatted
|
||||||
] with-string-writer ;
|
] with-string-writer ;
|
||||||
|
|
||||||
|
M: timestamp present timestamp>string ;
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors math math.parser calendar calendar.format
|
USING: accessors math math.parser strings words kernel effects ;
|
||||||
strings words kernel effects ;
|
|
||||||
IN: present
|
IN: present
|
||||||
|
|
||||||
GENERIC: present ( object -- string )
|
GENERIC: present ( object -- string )
|
||||||
|
|
||||||
M: real present number>string ;
|
M: real present number>string ;
|
||||||
|
|
||||||
M: timestamp present timestamp>string ;
|
|
||||||
|
|
||||||
M: string present ;
|
M: string present ;
|
||||||
|
|
||||||
M: word present name>> ;
|
M: word present name>> ;
|
||||||
|
|
Loading…
Reference in New Issue