Fixed bug in rmail-sortable-date-string.
authorBrian A. LaMacchia <edu/mit/csail/zurich/bal>
Mon, 4 Nov 1991 19:40:43 +0000 (19:40 +0000)
committerBrian A. LaMacchia <edu/mit/csail/zurich/bal>
Mon, 4 Nov 1991 19:40:43 +0000 (19:40 +0000)
4 Nov 91 became "9111 4", and 01 Nov 91 became "911101".
Which meant that 4 Nov 91 sorted before 01 Nov 91.

v7/src/edwin/rmailsrt.scm

index 26c863ffce5f5b2e67bde8b8fa70dd4bb8ef35ee..ce8e2ac2a870290d703a17e38ad3f75a53bf7828 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmailsrt.scm,v 1.4 1991/09/10 21:33:30 bal Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmailsrt.scm,v 1.5 1991/11/04 19:40:43 bal Exp $
 ;;;
 ;;;    Copyright (c) 1991 Massachusetts Institute of Technology
 ;;;
@@ -222,7 +222,7 @@ If prefix argument REVERSE is non-nil, sort them in reverse order."
                  (substring date
                             (re-match-start-index 1)
                             (re-match-end-index 1))))
-            (string-pad-left day 2))
+            (string-pad-left day 2 #\0))
           ;; Time
           (substring date (re-match-start-index 4) (re-match-end-index 4)))
       ;; Cannot understand DATE string.