bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates


From: Lars Ingebrigtsen
Subject: bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates
Date: Tue, 21 Dec 2021 12:01:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Bob Rogers <rogers-emacs@rgrjr.homedns.org> writes:

>    On the other hand, I can imagine the caller might want to insist that
> the passed string must be in a certain format and force an error if
> parse-time finds otherwise.

Yup.  That's one good reason to not have a time parsing function guess
at formats, because the input data will be different.

In my previous job, we had a library to parse date/time strings, and I
think we were up to about 80 distinct formats to handle the different
data feeds we were getting.  For instance, "01 02 03" may be three
different dates depending on where you get the date from.

>    One question:  Did you have in mind that parse-time should have the
> same return value as parse-time-string, in order to feed into the other
> Emacs time functions?

Yes, I think so.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]