Function: icalendar-read-weekdaynum

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

Signature

(icalendar-read-weekdaynum S)

Documentation

Read a weekday abbreviation to a number.

If the abbreviation is preceded by an offset, read a dotted pair (WEEKDAY . OFFSET). Thus "SU" becomes 0, "-1SU" becomes (0 . -1), etc. S should have been matched against icalendar-weekdaynum.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
(defun ical:read-weekdaynum (s)
  "Read a weekday abbreviation to a number.
If the abbreviation is preceded by an offset, read a dotted
pair (WEEKDAY . OFFSET).  Thus \"SU\" becomes 0, \"-1SU\"
becomes (0 . -1), etc.  S should have been matched against
`icalendar-weekdaynum'."
  ;; TODO: this smells like a design flaw.  Silence the byte compiler for now.
  (ignore s)
  (let ((dayno (cdr (assoc (match-string 20) ical:weekday-numbers)))
        (weekno (match-string 19)))
    (if weekno
        (cons dayno (string-to-number weekno))
      dayno)))