emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [new exporter] adhere org-export-date-timestamp-format?


From: Rasmus
Subject: [O] [new exporter] adhere org-export-date-timestamp-format?
Date: Sun, 18 Nov 2012 15:43:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Hi,

Would it be desirable if the new exporter took the variable
org-export-date-timestamp-format into consideration when formatting
dates?  Or is there another way of dealing with the formatting of
dates?

┏━━━┫  org-export-date-timestamp-format ~"%Y-%m-%d"~ ┃
┃     Type: string
┃     Since: Emacs version 24.1
┃     In file: org-exp.el 
┃     Time string format for Org timestamps in the #+DATE option.
┗━━━

Here's the relevant snip for org-exp. 

 ((string-equal key "DATE")
  ;; If date is an Org timestamp, convert it to a time
  ;; string using `org-export-date-timestamp-format'
  (when (string-match org-ts-regexp3 val)
    (setq val (format-time-string
               org-export-date-timestamp-format
               (apply 'encode-time (org-parse-time-string
                                    (match-string 0 val))))))
  (setq p (plist-put p :date val)))

Example:

#+BEGIN_SRC org
#+DATE: <2012-11-18 Sun>
* test
#+END_SRC

Date is exported as \date{<2012-11-18 Sun>} with the new exporter and
\date{2012-11-18} with the old exporter (using emacs -q).

Thanks,
Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]