Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-05 Thread Sergey Poznyakoff
> Maybe the solution isn't to flip-flop the implementation here, but to > document this concern and some method to disambiguate how to reliably > get the intended semantics. FWIW, parse_datetime prints a warning if DST changes after date adjustment[1,2]. Unfortunately, only in debugging mode, so

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-03 Thread Simon Josefsson via Gnulib discussion list
"Sergey Poznyakoff" writes: >> Maybe the solution isn't to flip-flop the implementation here, but to >> document this concern and some method to disambiguate how to reliably >> get the intended semantics. > > FWIW, parse_datetime prints a warning if DST changes after date > adjustment[1,2]. Unfo

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-03 Thread Guido Jäkel
On 03.04.25 13:46, Pádraig Brady wrote: On 03/04/2025 06:36, Guido Jäkel wrote: Dear Pádraig, thank you for clarification! And for the pointer to the FAQ. With the assumption that the time shifts all over the world will happen before noon, this will be a "working workaround". And IMHO, this m

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-03 Thread Pádraig Brady
On 03/04/2025 06:36, Guido Jäkel wrote: Dear Pádraig, thank you for clarification! And for the pointer to the FAQ. With the assumption that the time shifts all over the world will happen before noon, this will be a "working workaround". And IMHO, this must be called a workaround and not a "hav

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-03 Thread Guido Jäkel
... and that's exactly the point! Both are "right" in their context. But *here* there already *is* the (varying) possibility to exactly express what you mean in you domain specific context. The available syntax allow to specify (as an example) "24 hours" and also "1 day" (what might be 23 hours),

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-03 Thread Bruno Haible via Gnulib discussion list
Simon Josefsson wrote: > To give a different point of view, I'm not sure your suggested semantic > here is the only reasonable interpretation. The semantic you seem to > want is "same time as now only yesterday". However you ask for "1 day > ago". I think it is not unreasonable to interprete "1

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-03 Thread Simon Josefsson via Gnulib discussion list
Guido Jäkel writes: > Dear Pádraig, > > thank you for clarification! And for the pointer to the FAQ. With the > assumption that the time shifts all over the world will happen before > noon, this will be a "working workaround". And IMHO, this must be > called a workaround and not a "have-to-known"

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-02 Thread Guido Jäkel
Dear Pádraig, thank you for clarification! And for the pointer to the FAQ. With the assumption that the time shifts all over the world will happen before noon, this will be a "working workaround". And IMHO, this must be called a workaround and not a "have-to-known" , because it fixes the curre

Re: parse-datetime2: Semantic and implementation of "1 day ago"

2025-04-02 Thread Pádraig Brady
On 02/04/2025 13:04, Jäkel, Guido wrote: Dear Maintainers, I want to ask what's the exact semantic semantic and functionality of the keyword "1 day ago" and "yesterday" in parse-datetime2(), which is used by the `date`-command of coreutils. Because in a batch job running at every midnight (at