Variable: diary-date-insertion-form

diary-date-insertion-form is a customizable variable defined in calendar.el.gz.

Value

(month "/" day "/" year)

Documentation

Pseudo-pattern describing how to format a date for a new diary entry.

A pseudo-pattern is a list of expressions that can include the symbols month, day, and year (all numbers in string form), and monthname and dayname (both alphabetic strings). For example, a typical American form would be

       (month "/" day "/" (substring year -2))

whereas

       ((format "%9s, %9s %2s, %4s" dayname monthname day year))

would give the usual American style in fixed-length fields.

This pattern will be used by calendar-date-string (which see) to format dates when inserting them with diary-insert-entry, or when importing them from other formats into the diary.

If you customize this variable, you should also customize the variable diary-date-forms to include a pseudo-pattern which matches dates produced by this pattern. (If there is no corresponding pattern in diary-date-forms, then the diary will not recognize such dates, including those inserted into the diary from the calendar with diary-insert-entry.)

This variable was added, or its default value changed, in Emacs 31.1.

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defcustom diary-date-insertion-form
  (cond ((eq calendar-date-style 'iso) diary-iso-date-insertion-form)
        ((eq calendar-date-style 'european) diary-european-date-insertion-form)
        (t diary-american-date-insertion-form))
  "Pseudo-pattern describing how to format a date for a new diary entry.

A pseudo-pattern is a list of expressions that can include the symbols
`month', `day', and `year' (all numbers in string form), and `monthname'
and `dayname' (both alphabetic strings).  For example, a typical American
form would be

       (month \"/\" day \"/\" (substring year -2))

whereas

       ((format \"%9s, %9s %2s, %4s\" dayname monthname day year))

would give the usual American style in fixed-length fields.

This pattern will be used by `calendar-date-string' (which see) to
format dates when inserting them with `diary-insert-entry', or when
importing them from other formats into the diary.

If you customize this variable, you should also customize the variable
`diary-date-forms' to include a pseudo-pattern which matches dates
produced by this pattern.  (If there is no corresponding pattern in
`diary-date-forms', then the diary will not recognize such dates,
including those inserted into the diary from the calendar with
`diary-insert-entry'.)"
  :version "31.1"
  :type 'sexp
  :risky t
  :set-after '(calendar-date-style)
  :group 'diary)