]> git.eshelyaron.com Git - emacs.git/commitdiff
(nnimap-date-days-ago): Defeat locale.
authorGerd Moellmann <gerd@gnu.org>
Tue, 30 Oct 2001 11:23:48 +0000 (11:23 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 30 Oct 2001 11:23:48 +0000 (11:23 +0000)
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el

index 5e6856086d3eedb39cee4cc37846cb865cb622e3..2092dd639e45b8ae3cf960c3bbd84606b0ff9cb0 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-30  Simon Josefsson  <jas@extundo.com>
+
+       * nnimap.el (nnimap-date-days-ago): Defeat locale.
+
 2001-09-27  Gerd Moellmann  <gerd@gnu.org>
 
        * gnus-ems.el (gnus-article-display-xface): Skip over previously
index a117ea0778084ad585e1d5ae4d9011f843c9ba15..0d1c57c090fe9e4f25e63d9da357b5395a76ed37 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nnimap.el --- imap backend for Gnus
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <jas@pdc.kth.se>
 ;;         Jim Radford <radford@robby.caltech.edu>
@@ -1088,10 +1088,12 @@ function is generally only called when Gnus is shutting down."
 
 (defun nnimap-date-days-ago (daysago)
   "Return date, in format \"3-Aug-1998\", for DAYSAGO days ago."
-  (let ((date (format-time-string "%d-%b-%Y"
-                                 (nnimap-time-substract
-                                  (current-time)
-                                  (days-to-time daysago)))))
+  (let* ((time (nnimap-time-substract (current-time) (days-to-time daysago)))
+        (date (format-time-string
+               (format "%%d-%s-%%Y"
+                       (capitalize (car (rassoc (nth 4 (decode-time time))
+                                                parse-time-months))))
+               time)))
     (if (eq ?0 (string-to-char date))
        (substring date 1)
       date)))