Function: gnus-user-date
gnus-user-date is a byte-compiled function defined in gnus-sum.el.gz.
Signature
(gnus-user-date MESSY-DATE)
Documentation
Format the messy-date according to gnus-user-date-format-alist.
Returns " ? " if there's bad input or if another error occurs.
Input should look like this: "Sun, 14 Oct 2001 13:34:39 +0200".
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-user-date (messy-date)
"Format the messy-date according to `gnus-user-date-format-alist'.
Returns \" ? \" if there's bad input or if another error occurs.
Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
(condition-case ()
(let* ((messy-date (gnus-date-get-time messy-date))
(now (current-time))
;;If we don't find something suitable we'll use this one
(my-format "%b %d '%y"))
(let* ((difference (time-subtract now messy-date))
(templist gnus-user-date-format-alist)
(top (eval (caar templist) t)))
(while (if (numberp top) (time-less-p top difference) (not top))
(progn
(setq templist (cdr templist))
(setq top (eval (caar templist) t))))
(if (stringp (cdr (car templist)))
(setq my-format (cdr (car templist)))))
(format-time-string (eval my-format t) messy-date))
(error " ? ")))