diff options
Diffstat (limited to 'lisp/calendar/parse-time.el')
| -rw-r--r-- | lisp/calendar/parse-time.el | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 7651c5da1f4..b781cb0eb48 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; parse-time.el --- parsing time strings | 1 | ;;; parse-time.el --- parsing time strings -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 2000-2017 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996, 2000-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -203,12 +203,9 @@ any values that are unknown are returned as nil." | |||
| 203 | (time-second 2digit) | 203 | (time-second 2digit) |
| 204 | (time-secfrac "\\(\\.[0-9]+\\)?") | 204 | (time-secfrac "\\(\\.[0-9]+\\)?") |
| 205 | (time-numoffset (concat "\\([-+]\\)" time-hour ":?" time-minute "?")) | 205 | (time-numoffset (concat "\\([-+]\\)" time-hour ":?" time-minute "?")) |
| 206 | (time-offset (concat "Z" time-numoffset)) | ||
| 207 | (partial-time (concat time-hour colon time-minute colon time-second | 206 | (partial-time (concat time-hour colon time-minute colon time-second |
| 208 | time-secfrac)) | 207 | time-secfrac)) |
| 209 | (full-date (concat date-fullyear dash date-month dash date-mday)) | 208 | (full-date (concat date-fullyear dash date-month dash date-mday))) |
| 210 | (full-time (concat partial-time time-offset)) | ||
| 211 | (date-time (concat full-date "T" full-time))) | ||
| 212 | (list (concat "^" full-date) | 209 | (list (concat "^" full-date) |
| 213 | (concat "T" partial-time) | 210 | (concat "T" partial-time) |
| 214 | (concat "\\(Z\\|" time-numoffset "\\)"))) | 211 | (concat "\\(Z\\|" time-numoffset "\\)"))) |
| @@ -225,7 +222,7 @@ If DATE-STRING cannot be parsed, it falls back to | |||
| 225 | (time-re (nth 1 parse-time-iso8601-regexp)) | 222 | (time-re (nth 1 parse-time-iso8601-regexp)) |
| 226 | (tz-re (nth 2 parse-time-iso8601-regexp)) | 223 | (tz-re (nth 2 parse-time-iso8601-regexp)) |
| 227 | re-start | 224 | re-start |
| 228 | time seconds minute hour fractional-seconds | 225 | time seconds minute hour |
| 229 | day month year day-of-week dst tz) | 226 | day month year day-of-week dst tz) |
| 230 | ;; We need to populate 'time' with | 227 | ;; We need to populate 'time' with |
| 231 | ;; (SEC MIN HOUR DAY MON YEAR DOW DST TZ) | 228 | ;; (SEC MIN HOUR DAY MON YEAR DOW DST TZ) |
| @@ -240,9 +237,6 @@ If DATE-STRING cannot be parsed, it falls back to | |||
| 240 | (setq hour (string-to-number (match-string 1 date-string)) | 237 | (setq hour (string-to-number (match-string 1 date-string)) |
| 241 | minute (string-to-number (match-string 2 date-string)) | 238 | minute (string-to-number (match-string 2 date-string)) |
| 242 | seconds (string-to-number (match-string 3 date-string)) | 239 | seconds (string-to-number (match-string 3 date-string)) |
| 243 | fractional-seconds (string-to-number (or | ||
| 244 | (match-string 4 date-string) | ||
| 245 | "0")) | ||
| 246 | re-start (match-end 0)) | 240 | re-start (match-end 0)) |
| 247 | (when (string-match tz-re date-string re-start) | 241 | (when (string-match tz-re date-string re-start) |
| 248 | (if (string= "Z" (match-string 1 date-string)) | 242 | (if (string= "Z" (match-string 1 date-string)) |