On 26/07/19 08:29, Assaf Gordon wrote:
> Hello,
> 
> Some time ago there was a discussion relating to diffuculties of using
> GNU date's parsing. There was a mention of how using strptime(3) makes
> parsing explicit and easy.
> 
> I like that idea, and decided to try my hand at adding such options.
> 
> Attached is a proof of concept.
> 
> The first patch adds '--date-format=FORMAT', where FORMAT is
> strptime(3) format.

I like this, and think it's useful functionality.
It's equivalent to -f in date(1) on FreeBSD,
so we should probably support that short option

> The second patch adds '--arith-format=FORMAT', where FORMAT is limited
> to years/months/days/hours/minutes/seconds (%Y/%m/%d/%H/%M/%S).

The idea here is to support more generic numeric deltas.
I'm not sure of the interface though. Perhaps --delta-format
would be clearer. Or perhaps we should just support the
FreeBSD -v option to apply the adjustments, which seems more direct
and would further improve compat.

cheers,
Pádraig

Reply via email to