emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [new exporter] adhere org-export-date-timestamp-format?
@ 2012-11-18 14:43 Rasmus
  2012-12-24  1:50 ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Rasmus @ 2012-11-18 14:43 UTC (permalink / raw)
  To: emacs-orgmode

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!

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-30 23:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-18 14:43 [new exporter] adhere org-export-date-timestamp-format? Rasmus
2012-12-24  1:50 ` Bastien
2013-01-06 10:00   ` Nicolas Goaziou
2013-01-06 11:45     ` Bastien
2013-01-09 15:29       ` Nicolas Goaziou
2013-01-09 17:15         ` Bastien
2013-01-09 18:03           ` Nicolas Goaziou
2013-01-09 18:30             ` Bastien
2013-01-12 11:30               ` Nicolas Goaziou
2013-01-12 14:45                 ` Bastien
2013-01-30 21:53                   ` Nicolas Goaziou
2013-01-30 23:54                     ` Rasmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).