emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-time-stamp-custom-formats with out the name of the day of the we


From: Ihor Radchenko
Subject: Re: org-time-stamp-custom-formats with out the name of the day of the week
Date: Sat, 03 Sep 2022 21:31:48 +0800

<tomas@tuxteam.de> writes:

>> This cannot currently be customized. However, you can change
>> org-time-stamp-formats constant. Removing the %a should be safe.
>
> FWIW, I have this in an (eval-after-load 'org ...)
>
>   (setq org-time-stamp-formats
>      '("<%Y-%m-%d>" ."<%Y-%m-%d %H:%M>"))
>
> since years (> 5) and haven't observed any side effects. But then
> I don't meet every nook and cranny of org (I bow in awe to those
> who meet half of them :-)

This only works because you changed org-time-stamp-formats in one of the
few safe ways.

Org declares org-time-stamp-formats and Org code treats its value as a
constant making various kinds of unsafe assumptions that can break
things if the value of org-time-stamp-formats is changed. For example,
it is assumed that first/last characters are triangular brackets; it is
assumed that the output can be parsed using parse-time-string; it is
assumed that 1..11 substring in the format contains a full date; it is
assumed that the formatted output conforms to timestamp syntax; etc.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



reply via email to

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