Function: org-display-custom-time

org-display-custom-time is a byte-compiled function defined in org.el.gz.

Signature

(org-display-custom-time BEG END)

Documentation

Overlay modified time stamp format over timestamp between BEG and END.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-display-custom-time (beg end)
  "Overlay modified time stamp format over timestamp between BEG and END."
  (let* ((ts (buffer-substring beg end))
	 t1 with-hm tf time str (off 0))
    (save-match-data
      (setq t1 (org-parse-time-string ts t))
      (when (string-match "\\(-[0-9]+:[0-9]+\\)?\\( [.+]?\\+[0-9]+[hdwmy]\\(/[0-9]+[hdwmy]\\)?\\)?\\'" ts)
	(setq off (- (match-end 0) (match-beginning 0)))))
    (setq end (- end off))
    (setq with-hm (and (nth 1 t1) (nth 2 t1))
	  tf (org-time-stamp-format with-hm 'no-brackets 'custom)
	  time (org-fix-decoded-time t1)
	  str (org-add-props
		  (format-time-string tf (org-encode-time time))
		  nil 'mouse-face 'highlight))
    (put-text-property beg end 'display str)))