On this page:
calendar
8.12

1 Calendar picts🔗ℹ

procedure

(calendar month year #:draw-day draw-day)  pict?

  month : (integer-in 1 12)
  year : exact-nonnegative-integer?
  draw-day : (-> (option/c (integer-in 1 31)) pict?)
Produces a pict depicting the given month of the Gregorian calendar for the given year.

If draw-day is provided, it is called with either an integer representing the day of the month or #f for an empty calendar slot. For each day position on the calendar, the result of draw-day is shown in the resulting pict.

Examples:
> (calendar 12 1988)

image

> (calendar 3 2013
   #:draw-day (λ (day)
                (if day
                    (cc-superimpose
                     (hc-append (blank 3) (standard-fish 30 30) (blank 3))
                     (colorize (text (~a day)) "white"))
                    (blank 36 30))))

image