Mercurial > emacs
comparison lisp/timezone.el @ 17627:2492168c1d05
(timezone-parse-date): Match forms 1 and 2 first.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 03 May 1997 05:22:46 +0000 |
parents | eca5dfcd481d |
children | 7903b3fb5ec5 |
comparison
equal
deleted
inserted
replaced
17626:68cce262538d | 17627:2492168c1d05 |
---|---|
143 (month nil) | 143 (month nil) |
144 (day nil) | 144 (day nil) |
145 (time nil) | 145 (time nil) |
146 (zone nil)) ;This may be nil. | 146 (zone nil)) ;This may be nil. |
147 (cond ((string-match | 147 (cond ((string-match |
148 "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) | |
149 ;; Styles: (1) and (2) with timezone and buggy timezone | |
150 ;; This is most common in mail and news, | |
151 ;; so it is worth trying first. | |
152 (setq year 3 month 2 day 1 time 4 zone 5)) | |
153 ((string-match | |
154 "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\'" date) | |
155 ;; Styles: (1) and (2) without timezone | |
156 (setq year 3 month 2 day 1 time 4 zone nil)) | |
157 ((string-match | |
148 "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\'" date) | 158 "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\'" date) |
149 ;; Styles: (6) and (7) without timezone | 159 ;; Styles: (6) and (7) without timezone |
150 (setq year 6 month 3 day 2 time 4 zone nil)) | 160 (setq year 6 month 3 day 2 time 4 zone nil)) |
151 ((string-match | 161 ((string-match |
152 "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) | 162 "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) |
153 ;; Styles: (6) and (7) with timezone and buggy timezone | 163 ;; Styles: (6) and (7) with timezone and buggy timezone |
154 (setq year 6 month 3 day 2 time 4 zone 7)) | 164 (setq year 6 month 3 day 2 time 4 zone 7)) |
155 ((string-match | |
156 "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\'" date) | |
157 ;; Styles: (1) and (2) without timezone | |
158 (setq year 3 month 2 day 1 time 4 zone nil)) | |
159 ((string-match | |
160 "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) | |
161 ;; Styles: (1) and (2) with timezone and buggy timezone | |
162 (setq year 3 month 2 day 1 time 4 zone 5)) | |
163 ((string-match | 165 ((string-match |
164 "\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\([0-9]+\\)" date) | 166 "\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\([0-9]+\\)" date) |
165 ;; Styles: (3) without timezone | 167 ;; Styles: (3) without timezone |
166 (setq year 4 month 1 day 2 time 3 zone nil)) | 168 (setq year 4 month 1 day 2 time 3 zone nil)) |
167 ((string-match | 169 ((string-match |