aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-05-17 22:18:34 +0000
committerRichard M. Stallman <[email protected]>1993-05-17 22:18:34 +0000
commit1254728338db225ec2672a2a59078cf28da5621c (patch)
tree894ff5d966a1a6c169d439fe17f0d6ba09b3983b /lisp/mail
parent66050f1032c6371333e6f0303de01c7022f908ef (diff)
(rmail-sortable-date-string): Handle date in format
produced by current-time-string.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmailsort.el21
1 files changed, 20 insertions, 1 deletions
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 2ad4277a41..182da0613e 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -198,8 +198,27 @@ Arguments are MSG and FIELD."
(match-beginning 1) (match-end 1))))
;; Time
(substring date (match-beginning 4) (match-end 4)))
+
+ ;; Handles this format Fri May 10 21:51:55 1991
+ (if (string-match
+ " \\([a-z][a-z][a-z]\\) +\\([0-9]+\\) \\([0-9:]+\\) \\([0-9]+\\)" date)
+ (concat
+ ;; Year
+ (rmail-date-full-year
+ (substring date (match-beginning 4) (match-end 4)))
+ ;; Month
+ (cdr
+ (assoc
+ (upcase (substring date (match-beginning 1) (match-end 1))) month))
+ ;; Day
+ (format "%2d" (string-to-int
+ (substring date
+ (match-beginning 2) (match-end 2))))
+ ;; Time
+ (substring date (match-beginning 3) (match-end 3)))
+
;; Cannot understand DATE string.
- date)))
+ date))))
(defun rmail-date-full-year (year-string)
(if (<= (length year-string) 2)