[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: git-like parsing of date strings
From: |
Tim Landscheidt |
Subject: |
Re: git-like parsing of date strings |
Date: |
Tue, 28 Mar 2023 13:31:02 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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