emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] how to customize date export


From: Rasmus
Subject: Re: [O] how to customize date export
Date: Tue, 04 Feb 2014 22:48:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Eric S Fraga <address@hidden> writes:
>
>> Mirko Vukovic <address@hidden> writes:
>>
>> [...]
>>
>>> Hi Eric,
>>>
>>> Thanks for the note.  As it stands now, I cannot
>>> customize these two variables to do what I want, as they accept the
>>> whole time-steamp as argument.  I will enter the dates manually
>>> in the org file for now.
>>
>> I thought as much.  
>>
>> Looking through the code, some of the functions for outputting the time
>> stamps make use of org-translate-time which does allow some
>> customisation of how the dates and times are written out, along the
>> lines of what you were looking at for DATE entries.  Check the
>> documentation for that function.  But it could be I've misunderstood the
>> code...
>
> Based on Eric's hint, I followed org-translate-time's docstring (and
> references therein) and I came up with this which seems to work (in the
> sense that the dates look like <2014/02/03 Monday> when exported,
> which agrees with the specified format):
>
> #+STARTUP: customtime
>
> * foo
> <2014-02-03 Mon>
>
> # Local Variables:
> # org-time-stamp-custom-formats: ("<%Y/%m/%d %A>" . "<%Y/%m/%d %A %H:%M>")
> # End:
>
> However, the angle brackets seem to be required.

You could use a filter to get rid of the angle brackets for instance
org-export-filter-timestamp-functions.  There's also parse-time-string
together with the relevant DATE-formatting variables that can be used
to recast the appearance of time.

—Rasmus

-- 
Dung makes an excellent fertilizer




reply via email to

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