~rgrjr/rgr-hacks

b5144499aef4ee5b3f81f4a2d6cd8731797f3c1c — Bob Rogers 5 months ago 116e02e
Allow hyphens as parse-date token separators

* parse-date.el:
   + (parse-date--tokenize-string):  Bug fix:  Allow hyphens as token
     separators, being careful not to absorb them at the start of TZs.
1 files changed, 4 insertions(+), 2 deletions(-)

M parse-date.el
M parse-date.el => parse-date.el +4 -2
@@ 1,6 1,6 @@
;;; parse-date.el --- parsing time/date strings -*- lexical-binding: t -*-

;; Copyright (C) 2021 Free Software Foundation, Inc.
;; Copyright (C) 2021-2023 Free Software Foundation, Inc.

;; Author: Bob Rogers <rogers@rgrjr.com>
;; Keywords: util


@@ 133,7 133,9 @@ first `(' (per RFC5322), else we strip them all (per RFC822)."
            (cl-incf index))
          (while (and (< (cl-incf index) end)
                      (setq char (aref string index))
                      (not (or (parse-date--ignore-char? char)
		      ;; End the token on whitespace, a hyphen, or a comment.
                      (not (or (eq char ?-)
			       (parse-date--ignore-char? char)
                               (and strip-fws?
                                    (eq char ?\()))))
            (unless (<= ?0 char ?9)