[Top][All Lists]

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

Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

From: Kaushal
Subject: Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?
Date: Fri, 7 Aug 2015 10:52:41 -0400

Aha.. I am using a custom postamble for html:

            (setq org-html-postamble t) ; default value = 'auto
            (setq org-html-postamble-format
                     ,(concat "Exported using "
                              ;; "%c" is replaced with `org-html-creator-string'
                              ;; Emacs <VERSION> (Org mode <VERSION>)
                              "<div style=\"display: inline\" class=\"creator\">"
                              "%c</div> "
                              "by %e. — "
                              "<div style=\"display: inline\" class=\"date\">"

So it looks like "%d" returns an empty string if #+DATE: is omitted altogether; but if org-html-postamble is 'auto, today's date is entered if #+DATE: is omitted.

Kaushal Modi

On Fri, Aug 7, 2015 at 10:20 AM, Suvayu Ali <address@hidden> wrote:
On Fri, Aug 07, 2015 at 10:01:42AM -0400, Kaushal wrote:
> @Fabrice Thanks for sharing your examples!
> @Suvayu I tried removing #+DATE: line.. but with that I don't see the date
> stamp in html exports. The advantage of {{{time(FORMAT)}}} is that I can
> also control the formatting of the date-time stamp.

I just tested it, I get the following at the end of the exported html

<div id="postamble" class="status">
<p class="author">Author: Suvayu Ali</p>
<p class="date">Created: 2015-08-07 Fri 16:14</p>
<p class="validation"><a href="" href="http://validator.w3.org/check?uri=referer" rel="noreferrer" target="_blank">http://validator.w3.org/check?uri=referer">Validate</a></p>

I don't know any html, were you expecting something else?  About the
format, take a look at org-time-stamp-custom-formats and
org-time-stamp-formats; eventhough they are for timestamps in the
document, maybe they honour the document creation timestamp.


Open source is the future. It sets us free.

reply via email to

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