* gnus-util.el (gnus-user-date): Use %d instead of %m.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 13 May 2003 18:42:46 +0000 (18:42 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 13 May 2003 18:42:46 +0000 (18:42 +0000)
(gnus-user-date): Use floating point time so that we don't get
overflows.

* gnus-sum.el (gnus-summary-local-variables): Clean up.

lisp/ChangeLog
lisp/gnus-sum.el
lisp/gnus-util.el

index 4ff66e6..a1de86b 100644 (file)
@@ -1,5 +1,11 @@
 2003-05-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-util.el (gnus-user-date): Use %d instead of %m.
+       (gnus-user-date): Use floating point time so that we don't get
+       overflows. 
+
+       * gnus-sum.el (gnus-summary-local-variables): Clean up.
+
        * gnus-fun.el (gnus-display-x-face-in-from): Don't use centering
        since none of the other image things do.
 
index c2f601e..6256c04 100644 (file)
@@ -1367,8 +1367,7 @@ This list will always be a subset of gnus-newsgroup-undownloaded.")
     gnus-newsgroup-data gnus-newsgroup-data-reverse
     gnus-newsgroup-limit gnus-newsgroup-limits
     gnus-newsgroup-charset gnus-newsgroup-display
-    gnus-summary-use-undownloaded-faces
-)
+    gnus-summary-use-undownloaded-faces)
   "Variables that are buffer-local to the summary buffers.")
 
 (defvar gnus-newsgroup-variables nil
index 6ec80a4..acbf843 100644 (file)
 ;; age-depending date representations. (e.g. just the time if it's
 ;; from today, the day of the week if it's within the last 7 days and
 ;; the full date if it's older)
+
 (defun gnus-seconds-today ()
   "Returns the number of seconds passed today"
   (let ((now (decode-time (current-time))))
@@ -382,26 +383,21 @@ respectively.")
 Returns \"  ?  \" if there's bad input or if an other error occurs.
 Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
   (condition-case ()
-      (let* ((messy-date (safe-date-to-time messy-date))
-            (now (current-time))
+      (let* ((messy-date (time-to-seconds (safe-date-to-time messy-date)))
+            (now (time-to-seconds (current-time)))
             ;;If we don't find something suitable we'll use this one
-            (my-format "%b %m '%y")
-            (high (lsh (- (car now) (car messy-date)) 16)))
-       (if (and (> high -1) (= (logand high 65535) 0))
-           ;;overflow and bad input
-           (let* ((difference (+ high (- (car (cdr now))
-                                         (car (cdr messy-date)))))
-                  (templist gnus-user-date-format-alist)
-                  (top (eval (caar templist))))
-             (while (if (numberp top) (< top difference) (not top))
-               (progn
-                 (setq templist (cdr templist))
-                 (setq top (eval (caar templist)))))
-             (if (stringp (cdr (car templist)))
-                 (setq my-format (cdr (car templist))))))
-       (format-time-string (eval my-format) messy-date))
+            (my-format "%b %d '%y"))
+       (let* ((difference (- now messy-date))
+              (templist gnus-user-date-format-alist)
+              (top (eval (caar templist))))
+         (while (if (numberp top) (< top difference) (not top))
+           (progn
+             (setq templist (cdr templist))
+             (setq top (eval (caar templist)))))
+         (if (stringp (cdr (car templist)))
+             (setq my-format (cdr (car templist)))))
+       (format-time-string (eval my-format) (seconds-to-time messy-date)))
     (error "  ?   ")))
-;;end of Frank's code
 
 (defun gnus-dd-mmm (messy-date)
   "Return a string like DD-MMM from a big messy string."