Function: diary-fancy-date-pattern

diary-fancy-date-pattern is a byte-compiled function defined in diary-lib.el.gz.

This function is obsolete since 28.1.

Signature

(diary-fancy-date-pattern)

Documentation

Return a regexp matching the first line of a fancy diary date header.

This depends on the calendar date style.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;;; Fancy Diary Mode.

(defun diary-fancy-date-pattern ()
  "Return a regexp matching the first line of a fancy diary date header.
This depends on the calendar date style."
  (declare (obsolete nil "28.1"))
  (concat
   (calendar-dlet
       ((dayname (diary-name-pattern calendar-day-name-array nil t))
        (monthname (diary-name-pattern calendar-month-name-array nil t))
        (day "1")
        (month "2")
        ;; FIXME? This used to be "-?[0-9]+" - what was the "-?" for?
        (year "3"))
     ;; This is ugly.  c-d-d-form expects `day' etc to be "numbers in
     ;; string form"; eg the iso version calls string-to-number on some.
     ;; Therefore we cannot eg just let day = "[0-9]+".  (Bug#8583).
     ;; Assumes no integers in c-day/month-name-array.
     (replace-regexp-in-string "[0-9]+" "[0-9]+"
                               (mapconcat #'eval calendar-date-display-form "")
                               nil t))
   ;; Optional ": holiday name" after the date.
   "\\(: .*\\)?"))