summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-09-29 13:03:08 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-09-29 13:03:08 +0200
commit96636a8e1f5e91edb8ac4e88e0723beb7c71e160 (patch)
tree3be5fc1ad04ca795351944dc0518189f607ba227 /lisp/calendar
parent46eb6df45358f413847ceb882898b2326f7584c8 (diff)
downloademacs-96636a8e1f5e91edb8ac4e88e0723beb7c71e160.tar.gz
Fix up iso8601 time match regexp
* lisp/calendar/iso8601.el (iso8601--time-match): The fraction mark can be either . or , and there can be arbitrarily many digits in the fraction.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/iso8601.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el
index 0f42c824e32..f8949914f78 100644
--- a/lisp/calendar/iso8601.el
+++ b/lisp/calendar/iso8601.el
@@ -83,7 +83,7 @@
iso8601--ordinal-date-match)))
(defconst iso8601--time-match
- "\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?:?\\([0-9][0-9]\\)?\\.?\\([0-9][0-9][0-9]\\)?")
+ "\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?:?\\([0-9][0-9]\\)?[.,]?\\([0-9]+\\)?")
(defconst iso8601--zone-match
"\\(Z\\|\\([-+]\\)\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?\\)")
@@ -232,7 +232,7 @@ well as variants like \"2008W32\" (week number) and
(string-to-number (match-string 3 time))))
;; Hm...
(_millisecond (and (match-string 4 time)
- (string-to-number (match-string 4 time)))))
+ (string-to-number (match-string 4 time)))))
(iso8601--decoded-time :hour hour
:minute (or minute 0)
:second (or second 0)