+2005-04-09 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-util.el (wl-day-number): Abolish.
+
+ * wl-score.el (wl-score-headers): Use `elmo-time-to-days' instead
+ of `wl-day-number'.
+ (wl-score-followup): Ditto.
+ (wl-score-add-followups): Ditto.
+ (wl-score-get-latest-msgs): Ditto.
+ (wl-score-get-header-entry): Ditto.
+ (wl-score-edit-insert-date): Ditto.
+
2005-04-08 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-summary.el (wl-summary-print-message-with-ps-print): Call
(defun wl-score-headers (scores &optional force-msgs not-add)
(let* ((elmo-mime-charset wl-summary-buffer-mime-charset)
(folder wl-summary-buffer-elmo-folder)
- (now (wl-day-number (current-time-string)))
+ (now (elmo-time-to-days (current-time)))
(expire (and wl-score-expiry-days
(- now wl-score-expiry-days)))
(wl-score-stop-add-entry not-add)
expire
(< expire
(setq day
- (wl-day-number
- (elmo-time-make-date-string
- (elmo-message-entity-field
- (car art) 'date)))))))
+ (elmo-time-to-days
+ (elmo-message-entity-field
+ (car art) 'date))))))
(when (setq new (wl-score-add-followups
(car art) score all-scores alist thread
day))
(setq dont t)))
(unless dont
(let ((entry (list id score
- (or day (wl-day-number (current-time-string))) 's)))
+ (or day (elmo-time-to-days (current-time))) 's)))
(unless (or thread wl-score-stop-add-entry)
(wl-score-update-score-entry "references" entry alist))
(wl-score-set 'touched '(t) alist)
(wl-summary-score-effect (car entry) list (eq (nth 2 list) 'now)))))
(defun wl-score-get-latest-msgs ()
- (let* ((now (wl-day-number (current-time-string)))
+ (let* ((now (elmo-time-to-days (current-time)))
(expire (and wl-score-expiry-days
(- now wl-score-expiry-days)))
(rnumbers (reverse wl-summary-buffer-number-list))
nil t)
(catch 'break
(while rnumbers
- (if (< (wl-day-number
- (elmo-time-make-date-string
- (elmo-message-entity-field
- (elmo-message-entity wl-summary-buffer-elmo-folder
- (car rnumbers))
- 'date)))
+ (if (< (elmo-time-to-days
+ (elmo-message-entity-field wl-summary-buffer-elmo-folder
+ (car rnumbers)
+ 'date))
expire)
(throw 'break t))
(wl-push (car rnumbers) msgs)
(perm (cond ((eq perm 'perm)
nil)
((eq perm 'temp)
- (wl-day-number (current-time-string)))
+ (elmo-time-to-days (current-time)))
((eq perm 'now)
perm)))
(new (list match score perm type extra)))
(defun wl-score-edit-insert-date ()
"Insert date in numerical format."
(interactive)
- (princ (wl-day-number (current-time-string)) (current-buffer)))
+ (princ (elmo-time-to-days (current-time)) (current-buffer)))
(defun wl-score-pretty-print ()
"Format the current score file."
(wl-get-date-iso8601 date)
(error "")))
-(defun wl-day-number (date)
- (let ((dat (mapcar '(lambda (s) (and s (string-to-int s)) )
- (timezone-parse-date date))))
- (timezone-absolute-from-gregorian
- (nth 1 dat) (nth 2 dat) (car dat))))
-
(defun wl-url-news (url &rest args)
(interactive "sURL: ")
(if (string-match "^news:\\(.*\\)$" url)