Function: calendar-date-string

calendar-date-string is a byte-compiled function defined in calendar.el.gz.

Signature

(calendar-date-string DATE &optional ABBREVIATE NODAYNAME)

Documentation

A string form of DATE, driven by the variable calendar-date-display-form.

An optional parameter ABBREVIATE, when non-nil, causes the month and day names to be abbreviated as specified by calendar-month-abbrev-array and calendar-day-abbrev-array, respectively. An optional parameter NODAYNAME, when t, omits the name of the day of the week.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defun calendar-date-string (date &optional abbreviate nodayname)
  "A string form of DATE, driven by the variable `calendar-date-display-form'.
An optional parameter ABBREVIATE, when non-nil, causes the month
and day names to be abbreviated as specified by
`calendar-month-abbrev-array' and `calendar-day-abbrev-array',
respectively.  An optional parameter NODAYNAME, when t, omits the
name of the day of the week."
  (let ((month (calendar-extract-month date)))
    (calendar-dlet
        ((dayname (unless nodayname (calendar-day-name date abbreviate)))
         (monthname (calendar-month-name month abbreviate))
         (day (number-to-string (calendar-extract-day date)))
         (month (number-to-string month))
         (year (number-to-string (calendar-extract-year date))))
      (mapconcat #'eval calendar-date-display-form ""))))