Function: calendar-mark-days-named

calendar-mark-days-named is a byte-compiled function defined in diary-lib.el.gz.

Signature

(calendar-mark-days-named DAYNAME &optional COLOR)

Documentation

Mark all dates in the calendar window that are day DAYNAME of the week.

0 means all Sundays, 1 means all Mondays, and so on.
Optional argument COLOR is passed to calendar-mark-visible-date as MARK.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
(defun calendar-mark-days-named (dayname &optional color)
  "Mark all dates in the calendar window that are day DAYNAME of the week.
0 means all Sundays, 1 means all Mondays, and so on.
Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
  (with-current-buffer (calendar-get-buffer)
    (pcase-let* ((`(,m1 ,y1 ,m2 ,y2) (calendar-get-month-range))
                 (day (calendar-absolute-from-gregorian
                       (calendar-nth-named-day 1 dayname m1 y1)))
                 (last-day (calendar-absolute-from-gregorian
                            (calendar-nth-named-day -1 dayname m2 y2))))
      (while (<= day last-day)
        (calendar-mark-visible-date (calendar-gregorian-from-absolute day)
                                    color)
        (setq day (+ day 7))))))