diff --git a/contrib/lisp/org-e-ascii.el b/contrib/lisp/org-e-ascii.el
index 85968a60d..819a0c388 100644
--- a/contrib/lisp/org-e-ascii.el
+++ b/contrib/lisp/org-e-ascii.el
@@ -1724,12 +1724,10 @@ a communication channel."
(defun org-e-ascii-timestamp (timestamp contents info)
"Transcode a TIMESTAMP object from Org to ASCII.
CONTENTS is nil. INFO is a plist holding contextual information."
- (let ((value (org-translate-time (org-element-property :value timestamp)))
- (range-end
- (org-translate-time (org-element-property :range-end timestamp)))
- (utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
- (concat value
- (when range-end (concat (if utf8p "–" "--") range-end)))))
+ (let ((value (org-translate-time
+ (org-element-property :raw-value timestamp))))
+ (if (not (eq (plist-get info :ascii-charset) 'utf-8)) value
+ (replace-regexp-in-string "--" "–" value))))
;;;; Underline
diff --git a/contrib/lisp/org-e-groff.el b/contrib/lisp/org-e-groff.el
index f1538b4b3..7fe9eb7ca 100644
--- a/contrib/lisp/org-e-groff.el
+++ b/contrib/lisp/org-e-groff.el
@@ -1851,13 +1851,14 @@ information."
"Transcode a TIMESTAMP object from Org to Groff.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (let ((value (org-translate-time (org-element-property :value timestamp)))
- (type (org-element-property :type timestamp)))
- (cond ((memq type '(active active-range))
- (format org-e-groff-active-timestamp-format value))
- ((memq type '(inactive inactive-range))
- (format org-e-groff-inactive-timestamp-format value))
- (t (format org-e-groff-diary-timestamp-format value)))))
+ (let ((value (org-translate-time
+ (org-element-property :raw-value timestamp))))
+ (case (org-element-property :type timestamp)
+ ((active active-range)
+ (format org-e-groff-active-timestamp-format value))
+ ((inactive inactive-range)
+ (format org-e-groff-inactive-timestamp-format value))
+ (t (format org-e-groff-diary-timestamp-format value)))))
;;; Underline
diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
index fbfb0ab6c..0f3ed7d5a 100644
--- a/contrib/lisp/org-e-html.el
+++ b/contrib/lisp/org-e-html.el
@@ -2702,12 +2702,10 @@ information."
"Transcode a TIMESTAMP object from Org to HTML.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (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)))
+ (let ((value (org-translate-time
+ (org-element-property :raw-value timestamp))))
(format "%s"
- (if (not range-end) value
- (concat value "–" (org-translate-time (format f range-end)))))))
+ (replace-regexp-in-string "--" "–" value))))
;;;; Underline
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 58664a138..fdb9e31a8 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2452,21 +2452,23 @@ information."
"Transcode a TIMESTAMP object from Org to LaTeX.
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 ((value (org-translate-time
+ (org-element-property :raw-value timestamp))))
(case (org-element-property :type timestamp)
(active (format org-e-latex-active-timestamp-format value))
(active-range
- (concat (format org-e-latex-active-timestamp-format value)
- "--"
- (format org-e-latex-active-timestamp-format
- (org-translate-time range-end))))
+ (let ((timestamps (org-split-string value "--")))
+ (concat
+ (format org-e-latex-active-timestamp-format (car timestamps))
+ "--"
+ (format org-e-latex-active-timestamp-format (cdr timestamps)))))
(inactive (format org-e-latex-inactive-timestamp-format value))
(inactive-range
- (concat (format org-e-latex-inactive-timestamp-format value)
- "--"
- (format org-e-latex-inactive-timestamp-format
- (org-translate-time range-end))))
+ (let ((timestamps (org-split-string value "--")))
+ (concat
+ (format org-e-latex-inactive-timestamp-format (car timestamps))
+ "--"
+ (format org-e-latex-inactive-timestamp-format (cdr timestamps)))))
(otherwise (format org-e-latex-diary-timestamp-format value)))))
diff --git a/contrib/lisp/org-e-odt.el b/contrib/lisp/org-e-odt.el
index 2798b21b9..3478cc589 100644
--- a/contrib/lisp/org-e-odt.el
+++ b/contrib/lisp/org-e-odt.el
@@ -3305,17 +3305,22 @@ information."
"Transcode a TIMESTAMP object from Org to ODT.
CONTENTS is nil. INFO is a plist used as a communication
channel."
- (let ((timestamp-1 (org-element-property :value timestamp))
- (timestamp-2 (org-element-property :range-end timestamp)))
+ (let ((value (org-translate-time
+ (org-element-property :raw-value timestamp))))
(format "%s"
"OrgTimestampWrapper"
- (concat
- (format "%s"
- "OrgTimestamp" (org-translate-time timestamp-1))
- (and timestamp-2
- "–"
- (format "%s"
- "OrgTimestamp" (org-translate-time timestamp-2)))))))
+ (if (not (memq (org-element-property :type timestamp)
+ '(active-range inactive-range)))
+ value
+ (let ((timestamps (org-split-string value "--")))
+ (concat
+ (format "%s"
+ "OrgTimestamp"
+ (car timestamps))
+ "–"
+ (format "%s"
+ "OrgTimestamp"
+ (cdr timestamps))))))))
;;;; Underline
diff --git a/contrib/lisp/org-e-texinfo.el b/contrib/lisp/org-e-texinfo.el
index e75456016..79fa2ed09 100644
--- a/contrib/lisp/org-e-texinfo.el
+++ b/contrib/lisp/org-e-texinfo.el
@@ -1570,13 +1570,14 @@ information."
"Transcode a TIMESTAMP object from Org to Texinfo.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (let ((value (org-translate-time (org-element-property :value timestamp)))
- (type (org-element-property :type timestamp)))
- (cond ((memq type '(active active-range))
- (format org-e-texinfo-active-timestamp-format value))
- ((memq type '(inactive inactive-range))
- (format org-e-texinfo-inactive-timestamp-format value))
- (t (format org-e-texinfo-diary-timestamp-format value)))))
+ (let ((value (org-translate-time
+ (org-element-property :raw-value timestamp))))
+ (case (org-element-property :type timestamp)
+ ((active active-range)
+ (format org-e-texinfo-active-timestamp-format value))
+ ((inactive inactive-range)
+ (format org-e-texinfo-inactive-timestamp-format value))
+ (t (format org-e-texinfo-diary-timestamp-format value)))))
;;; Verbatim