Function: calendar-coptic-date-string

calendar-coptic-date-string is an autoloaded and byte-compiled function defined in cal-coptic.el.gz.

Signature

(calendar-coptic-date-string &optional DATE)

Documentation

String of Coptic date of Gregorian DATE.

Returns the empty string if DATE is pre-Coptic calendar. Defaults to today's date if DATE is not given.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-coptic.el.gz
;;;###cal-autoload
(defun calendar-coptic-date-string (&optional date)
  "String of Coptic date of Gregorian DATE.
Returns the empty string if DATE is pre-Coptic calendar.
Defaults to today's date if DATE is not given."
  (let* ((coptic-date (calendar-coptic-from-absolute
                       (calendar-absolute-from-gregorian
                        (or date (calendar-current-date)))))
         (y (calendar-extract-year coptic-date))
         (m (calendar-extract-month coptic-date)))
    (if (< y 1)
        ""
      (calendar-dlet
          ((monthname (aref calendar-coptic-month-name-array (1- m)))
           (day (number-to-string (calendar-extract-day coptic-date)))
           (dayname nil)
           (month (number-to-string m))
           (year (number-to-string y)))
        (mapconcat #'eval calendar-date-display-form "")))))