Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* no Date header: shown as Jan 01
@ 2002-11-13  4:41 Dan Jacobson
  2002-11-13  6:33 ` Nelson Ferreira
  2002-11-13 16:13 ` Eric Eide
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Jacobson @ 2002-11-13  4:41 UTC (permalink / raw)


Gnus is a weakling newsreader in that if a message doesn't have a Date
header, Gnus will say Jan 01 in the summary, at least in the Drafts
folder.  Stop lying about age... say "???" perhaps instead.
-- 
http://jidanni.org/ Taiwan(04)25854780


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: no Date header: shown as Jan 01
  2002-11-13  4:41 no Date header: shown as Jan 01 Dan Jacobson
@ 2002-11-13  6:33 ` Nelson Ferreira
  2002-11-13 16:13 ` Eric Eide
  1 sibling, 0 replies; 3+ messages in thread
From: Nelson Ferreira @ 2002-11-13  6:33 UTC (permalink / raw)


"Dan" == Dan Jacobson <jidanni@dman.ddts.net> writes:

    Dan> Gnus is a weakling newsreader in that if a message doesn't
    Dan> have a Date header, Gnus will say Jan 01 in the summary, at
    Dan> least in the Drafts folder.  Stop lying about age... say
    Dan> "???" perhaps instead. 

Try this in your .gnus

(defun gnus-user-format-function-y (header)
   "Show Outlook-style dates in summary line"
   (or (ignore-errors
	 (let ((message-time (date-to-time  (mail-header-date header)))
	       (now (current-time)))
	   (if (time-less-p now message-time)
	       "Future"
	     (let ((message-age
		    (- (time-to-seconds now) (time-to-seconds message-time))))
	       (if (< message-age (* 24 3600))
		   (format-time-string "%R" message-time)
		 (if (< message-age (* 7 (* 24 3600)))
		     (format-time-string "%a, %d" message-time)
		   (if (< message-age (* 365 (* 24 3600)))
		       (format-time-string "%d-%b" message-time)
                       (format-time-string "%d-%m-%y" message-time)))))))) 
       "????"))

(setq gnus-summary-line-format "%U%R%z%9uy%I%(%[%4L: %-23,23f%]%) %s\n")



-- 
Nelson Ferreira


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: no Date header: shown as Jan 01
  2002-11-13  4:41 no Date header: shown as Jan 01 Dan Jacobson
  2002-11-13  6:33 ` Nelson Ferreira
@ 2002-11-13 16:13 ` Eric Eide
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Eide @ 2002-11-13 16:13 UTC (permalink / raw)


"Dan" == Dan Jacobson <jidanni@dman.ddts.net> writes:

	Dan> Gnus is a weakling newsreader in that if a message doesn't have a
	Dan> Date header, Gnus will say Jan 01 in the summary, at least in the
	Dan> Drafts folder.  Stop lying about age... say "???" perhaps instead.

I've seen this problem as well, and I agree it's confusing.  An UNTESTED fix:

(defun gnus-dd-mmm (messy-date)
  "Return a string like DD-MMM from a big messy string."
  (condition-case ()
      (format-time-string "%d-%b" (date-to-time messy-date))
    (error "  -   ")))

The version of this function in Gnus 5.8.7 calls `safe-date-to-time', which
returns a zero-date if the string is unparseable.

Insinuating this function into your setup is left as an exercise for the
reader.

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-13 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-13  4:41 no Date header: shown as Jan 01 Dan Jacobson
2002-11-13  6:33 ` Nelson Ferreira
2002-11-13 16:13 ` Eric Eide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).