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

Previous Next

Package: emacs;

Reported by: Bob Rogers <rogers-emacs <at> rgrjr.homedns.org>

Date: Tue, 30 Nov 2021 21:49:02 UTC

Severity: normal

Found in version 28.0.60

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Bob Rogers <rogers-emacs <at> rgrjr.homedns.org>
Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>, Paul Eggert <eggert <at> cs.ucla.edu>, 52209 <at> debbugs.gnu.org
Subject: bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates
Date: Tue, 21 Dec 2021 12:01:07 +0100
Bob Rogers <rogers-emacs <at> 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




This bug report was last modified 3 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.