! See http://factorcode.org/license.txt for BSD license
USING: accessors calendar calendar.english combinators
command-line formatting grouping io kernel math.parser
-math.ranges namespaces sequences sequences.extras strings.tables
-;
+math.ranges namespaces sequences sequences.extras strings.tables ;
IN: tools.cal
<PRIVATE
: days ( timestamp -- days )
- beginning-of-month
+ start-of-month
[ day-of-week " " <repetition> ]
[ days-in-month [1,b] [ "%2d" sprintf ] map ] bi append
42 " " pad-tail ;