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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 20 Feb 2022 13:25:16 +0100

(Resending because bug report was archived.)

Bob Rogers <[email-masked]> writes:

> Here's what I have for this phase of the plan; let me know what you
> think.  It took longer than expected because it became a project unto
> itself, and so my procrastinator kicked in, making it longer still.  :-/

:-)

Have you benchmarked your new implementation versus the current one?
It's important that the parsing is performant, otherwise it'd slow down
many things that parse a large number of date strings.

Some minor comments about the code:

> +(defsubst ietf-drums-date--ignore-char? (char)
> +  ;; Ignore whitespace and commas.
> +  (or (eq char ?\ ) (eq char ?\t) (eq char ?\r) (eq char ?\n) (eq char ?,)))

In Emacs Lisp, we don't use Scheme-style predicate names -- we use -p
instead.

> +(defun ietf-drums-date--tokenize-string (string &optional comment-eof?)

And the same with booleans -- we don't use foo? for those, but just foo.

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