Browse Source

contrib/lisp/org-e-html.el: Honor the use of `org-time-stamp-custom-formats'

* org-e-html.el (org-e-html-timestamp): Honor the use of
`org-time-stamp-custom-formats'.
Bastien Guerry 12 years ago
parent
commit
c76d722fc4
1 changed files with 4 additions and 3 deletions
  1. 4 3
      contrib/lisp/org-e-html.el

+ 4 - 3
contrib/lisp/org-e-html.el

@@ -2857,11 +2857,12 @@ information."
   "Transcode a TIMESTAMP object from Org to HTML.
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
-  (let ((value (org-translate-time (org-element-property :value timestamp)))
-	(range-end (org-element-property :range-end timestamp)))
+  (let* ((f (if (eq (org-element-property :type timestamp) 'inactive) "[%s]" "<%s>"))
+	 (value (org-translate-time (format f (org-element-property :value timestamp))))
+	 (range-end (org-element-property :range-end timestamp)))
     (format "<span class=\"timestamp-wrapper\"><span class=\"timestamp\">%s</span></span>"
 	    (if (not range-end) value
-	      (concat value "&ndash;" (org-translate-time range-end))))))
+	      (concat value "&ndash;" (org-translate-time (format f range-end)))))))
 
 
 ;;;; Underline