Function: icalendar-print-weekdaynum

icalendar-print-weekdaynum is a byte-compiled function defined in icalendar-parser.el.gz.

Signature

(icalendar-print-weekdaynum VAL)

Documentation

Serialize a number or dotted pair VAL to a string.

The result is in the format required for a BYDAY recurrence rule clause. See icalendar-read-weekdaynum for the format of VAL.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
(defun ical:print-weekdaynum (val)
  "Serialize a number or dotted pair VAL to a string.
The result is in the format required for a BYDAY recurrence rule clause.
See `icalendar-read-weekdaynum' for the format of VAL."
  (if (consp val)
      (let* ((dayno (car val))
             (day (car (rassq dayno ical:weekday-numbers)))
             (offset (cdr val)))
        (concat (number-to-string offset) day))
    ;; number alone just stands for a day:
    (car (rassq val ical:weekday-numbers))))