Mercurial > emacs
changeset 2851:3b0a06fc7c4b
(rmail-sortable-date-string): Handle date in format
produced by current-time-string.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 17 May 1993 22:18:34 +0000 |
parents | f5f7e7295ec2 |
children | e80e6e533533 |
files | lisp/mail/rmailsort.el |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmailsort.el Mon May 17 21:52:21 1993 +0000 +++ b/lisp/mail/rmailsort.el Mon May 17 22:18:34 1993 +0000 @@ -198,8 +198,27 @@ (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)