From: Tim Landscheidt <tim@tim-landscheidt.de>
To: help-gnu-emacs@gnu.org
Subject: Re: git-like parsing of date strings
Date: Tue, 28 Mar 2023 13:31:02 +0000 [thread overview]
Message-ID: <87fs9p2eax.fsf@vagabond.tim-landscheidt.de> (raw)
In-Reply-To: CAJnXXoiSLL4V4oLCRyVN_zA9qdKU9cUWKrGXdP51ivZK=3SoBw@mail.gmail.com
John Yates <john@yates-sheets.org> wrote:
>> Relative dates can be parsed by org-read-date, but the syn-
>> tax is not very Git-like.
> Do you know where I would find that parsing code?
Well, it is probably somewhere in org-read-date-analyze, but
I would just use org-read-date:
| ELISP> (format-time-string "%Y-%m-%d" (org-read-date nil t "-3w"))
| "2023-03-07"
| ELISP> (format-time-string "%Y-%m-%d" (org-read-date nil t "+2d"))
| "2023-03-30"
| ELISP>
Tim
prev parent reply other threads:[~2023-03-28 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 14:00 git-like parsing of date strings John Yates
2023-03-27 14:05 ` Eli Zaretskii
2023-03-27 15:43 ` John Yates
2023-03-27 16:01 ` Eli Zaretskii
2023-03-27 23:49 ` Tim Landscheidt
2023-03-28 11:04 ` John Yates
2023-03-28 13:31 ` Tim Landscheidt [this message]
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fs9p2eax.fsf@vagabond.tim-landscheidt.de \
--to=tim@tim-landscheidt.de \
--cc=help-gnu-emacs@gnu.org \
/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).