Function: org-export-get-date
org-export-get-date is a byte-compiled function defined in ox.el.gz.
Signature
(org-export-get-date INFO &optional FMT)
Documentation
Return date value for the current document.
INFO is a plist used as a communication channel. FMT, when
non-nil, is a time format string that will be applied on the date
if it consists in a single timestamp object. It defaults to
org-export-date-timestamp-format when nil.
A proper date can be a secondary string, a string or nil. It is
meant to be translated with org-export-data or alike.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
;;;; For Keywords
;;
;; `org-export-get-date' returns a date appropriate for the document
;; to about to be exported. In particular, it takes care of
;; `org-export-date-timestamp-format'.
(defun org-export-get-date (info &optional fmt)
"Return date value for the current document.
INFO is a plist used as a communication channel. FMT, when
non-nil, is a time format string that will be applied on the date
if it consists in a single timestamp object. It defaults to
`org-export-date-timestamp-format' when nil.
A proper date can be a secondary string, a string or nil. It is
meant to be translated with `org-export-data' or alike."
(let ((date (plist-get info :date))
(fmt (or fmt org-export-date-timestamp-format)))
(cond ((not date) nil)
((and fmt
(not (cdr date))
(org-element-type-p (car date) 'timestamp))
(org-format-timestamp (car date) fmt))
(t date))))