diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-05-03 05:22:46 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-05-03 05:22:46 +0000 |
commit | 2e3571ffea41b3fea24ce9d86b533539d969c706 (patch) | |
tree | d92a825113cc70b71c33d3e166315773d8abb785 /lisp | |
parent | 926582e336185976982628d515facc242752a6e1 (diff) | |
download | emacs-2e3571ffea41b3fea24ce9d86b533539d969c706.tar.gz |
(timezone-parse-date): Match forms 1 and 2 first.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/timezone.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/timezone.el b/lisp/timezone.el index 175cb182519..949a7f12dc2 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el @@ -145,6 +145,16 @@ Understands the following styles: (time nil) (zone nil)) ;This may be nil. (cond ((string-match + "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) + ;; Styles: (1) and (2) with timezone and buggy timezone + ;; This is most common in mail and news, + ;; so it is worth trying first. + (setq year 3 month 2 day 1 time 4 zone 5)) + ((string-match + "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\'" date) + ;; Styles: (1) and (2) without timezone + (setq year 3 month 2 day 1 time 4 zone nil)) + ((string-match "\\([^ \t,]+\\),[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\(T[ \t]+\\|\\)\\([0-9]+\\)[ \t]*\\'" date) ;; Styles: (6) and (7) without timezone (setq year 6 month 3 day 2 time 4 zone nil)) @@ -153,14 +163,6 @@ Understands the following styles: ;; Styles: (6) and (7) with timezone and buggy timezone (setq year 6 month 3 day 2 time 4 zone 7)) ((string-match - "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\'" date) - ;; Styles: (1) and (2) without timezone - (setq year 3 month 2 day 1 time 4 zone nil)) - ((string-match - "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) - ;; Styles: (1) and (2) with timezone and buggy timezone - (setq year 3 month 2 day 1 time 4 zone 5)) - ((string-match "\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\([0-9]+\\)" date) ;; Styles: (3) without timezone (setq year 4 month 1 day 2 time 3 zone nil)) |