Variable: todo-date-pattern

todo-date-pattern is a variable defined in todo-mode.el.gz.

Value

"\\(?4:\\(?5:\\(\\(?:Fri\\|Mon\\|S\\(?:atur\\|un\\)\\|\\(?:T\\(?:hur\\|ue\\)\\|Wedne\\)s\\)day\\)\\)\\|\\(?6:\\(?:\\*\\.?\\|A\\(?:pr\\(?:\\.\\|il\\)?\\|ug\\(?:\\.\\|ust\\)?\\)\\|Dec\\(?:\\.\\|ember\\)?\\|Feb\\(?:\\.\\|ruary\\)?\\|J\\(?:an\\(?:\\.\\|uary\\)?\\|u\\(?:l[.y]\\|n[.e]\\|[ln]\\)\\)\\|Ma\\(?:r\\(?:\\.\\|ch\\)\\|y\\.\\|[ry]\\)\\|Nov\\(?:\\.\\|ember\\)?\\|Oct\\(?:\\.\\|ober\\)?\\|Sep\\(?:\\.\\|tember\\)?\\)\\) \\(?8:[0-9]+\\|\\*\\), \\(?9:[0-9]+\\|\\*\\)\\)"

Documentation

Regular expression matching a todo item date header.

The value of calendar-date-display-form determines the form of the date header.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/todo-mode.el.gz
(defconst todo-date-pattern
  (let* ((dayname (diary-name-pattern calendar-day-name-array nil t))
         (d (concat "\\(?" (alist-get 'day todo--date-pattern-groups)
                    ":[0-9]+\\|\\*\\)"))
         (mn (format (concat "\\(?" (alist-get 'monthname
                                               todo--date-pattern-groups)
                             ":%s\\)")
                     (diary-name-pattern todo-month-name-array
                                         todo-month-abbrev-array)))
         (m (concat "\\(?" (alist-get 'month todo--date-pattern-groups)
                    ":[0-9]+\\|\\*\\)"))
         (y (concat "\\(?" (alist-get 'year todo--date-pattern-groups)
                    ":[0-9]+\\|\\*\\)"))
         (dd "1111111")
         (mm "2222222")
         (yy "3333333")
         (s (concat "\\(?4:\\(?5:" dayname "\\)\\|"
                    (calendar-dlet
                        ((dayname)
                         (monthname mn)
                         (year yy)
                         (month mm)
                         (day dd))
                      (mapconcat #'eval calendar-date-display-form))
                    "\\)")))
    ;; The default value of calendar-iso-date-display-form calls
    ;; `string-to-number' on the values of `month' and `day', so we
    ;; gave them placeholder values above and now replace these with
    ;; the necessary regexps with appropriately numbered groups, because
    ;; `todo-edit-item--header' uses these groups.
    (when (string-match dd s nil t)
      (setq s (string-replace dd d s)))
    (when (string-match mm s nil t)
      (setq s (string-replace mm m s)))
    (when (string-match yy s nil t)
      (setq s (string-replace yy y s)))
    s)
  "Regular expression matching a todo item date header.
The value of `calendar-date-display-form' determines the form of
the date header.")