From: Gerd Moellmann Date: Tue, 30 Oct 2001 11:23:48 +0000 (+0000) Subject: (nnimap-date-days-ago): Defeat locale. X-Git-Tag: emacs-21.2~415 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8d28241c36b51d2c6f6a8b66e421dbf47a0c8231;p=emacs.git (nnimap-date-days-ago): Defeat locale. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5e6856086d3..2092dd639e4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2001-10-30 Simon Josefsson + + * nnimap.el (nnimap-date-days-ago): Defeat locale. + 2001-09-27 Gerd Moellmann * gnus-ems.el (gnus-article-display-xface): Skip over previously diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index a117ea07780..0d1c57c090f 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -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 ;; Jim Radford @@ -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)))