Function: gnus-score-date-convert
gnus-score-date-convert is a byte-compiled function defined in
gnus-cus.el.gz.
Signature
(gnus-score-date-convert WIDGET)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-cus.el.gz
(defun gnus-score-date-convert (widget)
;; Set args appropriately.
(let* ((tag (widget-get widget :tag))
(item `(const :format "" :value ,(downcase tag)))
(match '(string :tag "Match"))
(score '(choice :tag "Score"
(const :tag "default" nil)
(integer :format "%v"
:hide-front-space t)))
(expire '(choice :tag "Expire"
(const :tag "off" nil)
(integer :format "%v"
:hide-front-space t)))
(type '(choice :tag "Type"
:value regexp
(const regexp)
(const before)
(const at)
(const after)))
(group `(group ,match ,score ,expire ,type))
(doc (concat (or (widget-get widget :doc)
(concat "Change score based on the " tag
" header."))
"
For the Date header we have three kinda silly match types: `before',
`at' and `after'. I can't really imagine this ever being useful, but,
like, it would feel kinda silly not to provide this function. Just in
case. You never know. Better safe than sorry. Once burnt, twice
shy. Don't judge a book by its cover. Never not have sex on a first
date. (I have been told that at least one person, and I quote,
\"found this function indispensable\", however.)
A more useful match type is `regexp'. With it, you can match the date
string using a regular expression. The date is normalized to ISO8601
compact format first---`YYYYMMDDTHHMMSS'. If you want to match all
articles that have been posted on April 1st in every year, you could
use `....0401.........' as a match string, for instance. (Note that
the date is kept in its original time zone, so this will match
articles that were posted when it was April 1st where the article was
posted from. Time zones are such wholesome fun for the whole family,
eh?")))
(widget-put widget :args `(,item
(repeat :inline t
:indent 0
:tag ,tag
:doc ,doc
:format "%t:\n%h%v%i\n\n"
,group))))
widget)