From: Ihor Radchenko <[email protected]>
To: Zoey Hewll <[email protected]>
Cc: [email protected]
Subject: Re: [FR] org-read-date-style
Date: Sat, 15 Mar 2025 16:00:09 +0000 [thread overview]
Message-ID: <87a59mgu7q.fsf@localhost> (raw)
In-Reply-To: <[email protected]>
Zoey Hewll <[email protected]> writes:
> * Motivation
> The prevailing date format where I live is D/M/Y, often abbreviated to
> D/M. While I prefer Y-M-D as a persistent storage format, I naturally
> default to D/M and prefer it for data entry. Especially when entering
> recent dates (with =org-read-date-prefer-future= set to nil), which
> usually do not require the year component and therefore the unambiguous
> ISO 8601 format (Y-M-D) is slower to input in full, and does not match
> the locally conventional order (D/M) when abbreviated (M-D).
>
> * Proposal
> The =org-read-date= function understands slash-separated dates in the
> "american" format (M/D/Y and M/D). This code could be modified so that
> the parsing of slash-separated dates depends on user preference, by
> introducing a configuration variable like =calendar-date-style=, which
> I'm tentatively naming =org-read-date-style=. Like
> =calendar-date-style=, this would change the parsing of slash-separated
> dates by =org-read-date=, but it would not change the order of arguments
> passed to date-processing functions.
>
> It would support at least =american= (M/D and M/D/Y) and =european= (D/M
> and D/M/Y) options.
I do not mind such an addition.
> * Alternatives and Extensions
> - =org-read-date= could simply read the value of =calendar-date-style=
> rather than introducing a new configuration item. I propose a new item
> because of the well-documented pitfalls of =calendar-date-style=.
Maybe we can default `org-read-date-style' to the value of `calendar-date-style'.
> - There could be an option to entirely forbid dates in slash-separated
> formats, if the user wishes to avoid the possibility of this kind of
> misinterpretation. I have not proposed this as I have no use for it.
This sounds excessive. If user does not want to use /, just do not type it.
> ... side-note: I
> have not attached a patch as I am yet to complete the copyright
> assignment, but I thought the feature was worthwhile to request regardless.)
If you need any help with the copyright assignment process, please let me know.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
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>
next prev parent reply other threads:[~2025-03-15 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 11:08 [FR] org-read-date-style Zoey Hewll
2025-03-15 16:00 ` Ihor Radchenko [this message]
2025-04-29 17:22 ` Ihor Radchenko
2025-05-13 14:59 ` Zoey Hewll
2025-07-13 14:32 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a59mgu7q.fsf@localhost \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).