Simplify use of current-time and friends
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 29 Oct 2014 02:19:38 +0000 (02:19 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 29 Oct 2014 02:19:38 +0000 (02:19 +0000)
commit75723739287ba519d3cb65f4d7caaffcb662ebd3
tree52389b18b82bc0148480770d72a7312a0bd8f763
parent8bb74da7932287e4f5fd806aa6c7dae35256bdce
Simplify use of current-time and friends

* gnus-delay.el (gnus-delay-article):
* gnus-sum.el (gnus-summary-read-document):
* gnus-util.el (gnus-seconds-today, gnus-seconds-month):
* message.el (message-make-expires-date):
Omit unnecessary call to current-time.
* gnus-util.el (gnus-float-time): Simplify to an alias because
time-to-seconds now behaves like float-time with respect to nil arg.
(gnus-seconds-year): Don't call current-time twice to get the current
time stamp, as this can lead to inconsistent results.
* time-date.el (time-to-seconds) [!float-time]:
Use current time if arg is nil, to be compatible with float-time.
(time-date--day-in-year): New function, with most of the guts of
the old time-to-day-in-year.
(time-to-day-in-year): Use it.
(time-to-days): Use it, to avoid decoding the same time stamp twice.
lisp/ChangeLog
lisp/gnus-delay.el
lisp/gnus-sum.el
lisp/gnus-util.el
lisp/message.el
lisp/time-date.el