diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-29 12:54:45 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-29 12:54:45 +0200 |
commit | 1af666c6b4325a28a0facaf6424b69ad64b7b254 (patch) | |
tree | f8ec5bbccceb2c4fbf0ae53152579b22163e1250 /lisp/calendar/iso8601.el | |
parent | 57ca5db4c2dfceef28f0cb9f1398f4752ffaae51 (diff) | |
download | emacs-1af666c6b4325a28a0facaf6424b69ad64b7b254.tar.gz |
Add more tests from the standard
Diffstat (limited to 'lisp/calendar/iso8601.el')
-rw-r--r-- | lisp/calendar/iso8601.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el index 83b57a4f56a..f44ed3858f6 100644 --- a/lisp/calendar/iso8601.el +++ b/lisp/calendar/iso8601.el @@ -66,7 +66,7 @@ "\\([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]\\)?\\)") + "\\(Z\\|\\([-+]\\)\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?\\)") (defconst iso8601--full-time-match (concat "\\(" (replace-regexp-in-string "(" "(?:" iso8601--time-match) "\\)" @@ -76,8 +76,8 @@ (concat "\\(" iso8601--date-match "\\)" "\\(?:T\\(" (replace-regexp-in-string "(" "(?:" iso8601--time-match) - "\\)\\)?" - "\\(" iso8601--zone-match "\\)?")) + "\\)" + "\\(" iso8601--zone-match "\\)?\\)?")) (defconst iso8601--duration-full-match "P\\([0-9]+Y\\)?\\([0-9]+M\\)?\\([0-9]+D\\)?\\(T\\([0-9]+H\\)?\\([0-9]+M\\)?\\([0-9]+S\\)?\\)?") @@ -303,7 +303,7 @@ Return the number of minutes." (or duration (decode-time (time-subtract (iso8601--encode-time end) (iso8601--encode-time start)) - (decoded-time-zone end)))))) + (or (decoded-time-zone end) 0)))))) (defun iso8601--match (regexp string) (string-match (concat "\\`" regexp "\\'") string)) |