Function: diary-date

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

Signature

(diary-date MONTH DAY YEAR &optional MARK)

Documentation

Specific date(s) diary entry.

Entry applies if date is MONTH, DAY, YEAR. Each parameter can be a list of integers, t (meaning all values), or an integer. The order of the input parameters changes according to calendar-date-style
(e.g. to DAY MONTH YEAR in the European style).

An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;;; Sexp diary functions.

;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
(defun diary-date (month day year &optional mark)
  "Specific date(s) diary entry.
Entry applies if date is MONTH, DAY, YEAR.  Each parameter can be a
list of integers, t (meaning all values), or an integer.  The order
of the input parameters changes according to `calendar-date-style'
\(e.g. to DAY MONTH YEAR in the European style).

An optional parameter MARK specifies a face or single-character string
to use when highlighting the day in the calendar."
  (with-no-warnings (defvar date) (defvar entry))
  (let* ((ddate (diary-make-date month day year))
         (dd (calendar-extract-day ddate))
         (mm (calendar-extract-month ddate))
         (yy (calendar-extract-year ddate))
         (m (calendar-extract-month date))
         (y (calendar-extract-year date))
         (d (calendar-extract-day date)))
    (and
     (or (and (listp dd) (memq d dd))
         (equal d dd)
         (eq dd t))
     (or (and (listp mm) (memq m mm))
         (equal m mm)
         (eq mm t))
     (or (and (listp yy) (memq y yy))
         (equal y yy)
         (eq yy t))
     (cons mark entry))))