Function: org-html--format-timestamp

org-html--format-timestamp is a byte-compiled function defined in ox-html.el.gz.

Signature

(org-html--format-timestamp TIMESTAMP INFO)

Documentation

Format given TIMESTAMP for inclusion in an HTML document.

INFO is a plist used as a communication channel. Formatted timestamp will be wrapped in an element with class timestamp.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-html.el.gz
(defun org-html--format-timestamp (timestamp info)
  "Format given TIMESTAMP for inclusion in an HTML document.
INFO is a plist used as a communication channel.  Formatted timestamp
will be wrapped in an element with class timestamp."
  (let ((html-tag (if (org-html--html5-fancy-p info) "time" "span"))
        (html-attrs (concat "class=\"timestamp\""
                            (when (org-html--html5-fancy-p info)
                              (format " datetime=\"%s\""
                                      (org-format-timestamp
                                       timestamp
                                       (if (org-timestamp-has-time-p timestamp)
                                           (cdr org-html-datetime-formats)
                                           (car org-html-datetime-formats))))))))
    (replace-regexp-in-string
     "--"
     "–"
     (format "<%s %s>%s</%s>"
             html-tag
             html-attrs
             (org-html-plain-text (org-timestamp-translate timestamp)
                                  info)
             html-tag))))