Function: cal-html-insert-agenda-days
cal-html-insert-agenda-days is a byte-compiled function defined in
cal-html.el.gz.
Signature
(cal-html-insert-agenda-days MONTH YEAR DIARY-LIST HOLIDAY-LIST)
Documentation
Insert HTML commands for a range of days in monthly calendars.
HTML commands are inserted for the days of the numeric MONTH in four-digit YEAR. Includes diary entries in DIARY-LIST, and holidays in HOLIDAY-LIST.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-html.el.gz
(defun cal-html-insert-agenda-days (month year diary-list holiday-list)
"Insert HTML commands for a range of days in monthly calendars.
HTML commands are inserted for the days of the numeric MONTH in
four-digit YEAR. Includes diary entries in DIARY-LIST, and
holidays in HOLIDAY-LIST."
(let ((blank-days ; at start of month
(mod (- (calendar-day-of-week (list month 1 year))
calendar-week-start-day)
7))
(last (calendar-last-day-of-month month year))
date)
(insert "<a name=0>\n")
(insert (cal-html-b-table "class=agenda border=1"))
(dotimes (i last)
(setq date (list month (1+ i) year))
(insert
(format "<a name=%d></a>\n" (1+ i)) ; link
cal-html-b-tablerow-string
;; Number & day name.
cal-html-b-tableheader-string
(if cal-html-print-day-number-flag
(format "<em>%d</em> "
(calendar-day-number date))
"")
(format "%d %s" (1+ i)
(aref calendar-day-name-array
(calendar-day-of-week date)))
cal-html-e-tableheader-string
;; Diary entries.
cal-html-b-tabledata-string
(cal-html-htmlify-list holiday-list date t)
(if (and holiday-list diary-list) "<BR>\n" "")
(cal-html-htmlify-list diary-list date)
cal-html-e-tabledata-string
cal-html-e-tablerow-string)
;; If end of week and not end of month, make new table.
(if (and (zerop (mod (+ i 1 blank-days) 7))
(/= (1+ i) last))
(insert cal-html-e-table-string
(cal-html-b-table
"class=agenda border=1")))))
(insert cal-html-e-table-string))