diff options
| author | Richard M. Stallman | 1994-11-16 22:21:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-11-16 22:21:39 +0000 |
| commit | 2f9a1ee28352cbe0ea64632131df1d5a08201d9c (patch) | |
| tree | 558fa3ec9c7090f67799887772e2eda835a5c6f9 | |
| parent | cc9b34b0b425582ffbf0d9a99d34e15646187a2a (diff) | |
| download | emacs-2f9a1ee28352cbe0ea64632131df1d5a08201d9c.tar.gz emacs-2f9a1ee28352cbe0ea64632131df1d5a08201d9c.zip | |
(timezone-parse-date): Handle two new formats (6 and 7).
| -rw-r--r-- | lisp/timezone.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/timezone.el b/lisp/timezone.el index 26db8039313..56dbff02b5b 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el | |||
| @@ -127,7 +127,9 @@ Understands the following styles: | |||
| 127 | (2) Fri, 17 Mar 89 4:01[:33] [GMT] | 127 | (2) Fri, 17 Mar 89 4:01[:33] [GMT] |
| 128 | (3) Mon Jan 16 16:12[:37] [GMT] 1989 | 128 | (3) Mon Jan 16 16:12[:37] [GMT] 1989 |
| 129 | (4) 6 May 1992 1641-JST (Wednesday) | 129 | (4) 6 May 1992 1641-JST (Wednesday) |
| 130 | (5) 22-AUG-1993 10:59:12.82" | 130 | (5) 22-AUG-1993 10:59:12.82 |
| 131 | (6) Thu, 11 Apr 16:17:12 91 [MET] | ||
| 132 | (7) Mon, 6 Jul 16:47:20 T 1992 [MET]" | ||
| 131 | (let ((date (or date "")) | 133 | (let ((date (or date "")) |
| 132 | (year nil) | 134 | (year nil) |
| 133 | (month nil) | 135 | (month nil) |
| @@ -135,6 +137,14 @@ Understands the following styles: | |||
| 135 | (time nil) | 137 | (time nil) |
| 136 | (zone nil)) ;This may be nil. | 138 | (zone nil)) ;This may be nil. |
| 137 | (cond ((string-match | 139 | (cond ((string-match |
| 140 | "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\'" date) | ||
| 141 | ;; Styles: (6) and (7) without timezone | ||
| 142 | (setq year 6 month 3 day 2 time 4 zone nil)) | ||
| 143 | ((string-match | ||
| 144 | "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) | ||
| 145 | ;; Styles: (6) and (7) with timezone and buggy timezone | ||
| 146 | (setq year 6 month 3 day 2 time 4 zone 7)) | ||
| 147 | ((string-match | ||
| 138 | "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\'" date) | 148 | "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\'" date) |
| 139 | ;; Styles: (1) and (2) without timezone | 149 | ;; Styles: (1) and (2) without timezone |
| 140 | (setq year 3 month 2 day 1 time 4 zone nil)) | 150 | (setq year 3 month 2 day 1 time 4 zone nil)) |