Function: diary-outlook-format-1
diary-outlook-format-1 is a byte-compiled function defined in
diary-lib.el.gz.
Signature
(diary-outlook-format-1 BODY)
Documentation
Return a replace-match template for an element of diary-outlook-formats.
Returns a string using match elements 1-5, where:
1 = month name, 2 = day, 3 = year, 4 = time, 5 = location; also uses
%s = message subject. BODY is the string from which the matches derive.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
(defun diary-outlook-format-1 (body)
"Return a replace-match template for an element of `diary-outlook-formats'.
Returns a string using match elements 1-5, where:
1 = month name, 2 = day, 3 = year, 4 = time, 5 = location; also uses
%s = message subject. BODY is the string from which the matches derive."
(let* ((monthname (match-string 1 body))
(day (match-string 2 body))
(year (match-string 3 body))
;; Blech.
(month (catch 'found
(dotimes (i (length calendar-month-name-array))
(if (string-equal (aref calendar-month-name-array i)
monthname)
(throw 'found (1+ i))))
nil)))
;; If we could convert the monthname to a numeric month, we can
;; use the standard function calendar-date-string.
(concat (if month
(calendar-date-string (list month (string-to-number day)
(string-to-number year))
nil t)
(cond ((eq calendar-date-style 'iso) "\\3 \\1 \\2") ; YMD
((eq calendar-date-style 'european) "\\2 \\1 \\3") ; DMY
(t "\\1 \\2 \\3"))) ; MDY
"\n \\4 %s, \\5")))