projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3bbd66
)
Use decoded time accessors in time-date
author
Lars Ingebrigtsen
<larsi@gnus.org>
Tue, 30 Jul 2019 11:07:49 +0000
(13:07 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Tue, 30 Jul 2019 11:07:49 +0000
(13:07 +0200)
* lisp/calendar/time-date.el (time-to-days): Use decoded time
accessors.
lisp/calendar/time-date.el
patch
|
blob
|
history
diff --git
a/lisp/calendar/time-date.el
b/lisp/calendar/time-date.el
index d299dc5e7d15161eb00d83f3fc2f705c6467dfeb..e195f71c58af4f015429a4e02ff50c4611ff805f 100644
(file)
--- a/
lisp/calendar/time-date.el
+++ b/
lisp/calendar/time-date.el
@@
-237,7
+237,7
@@
DATE1 and DATE2 should be date-time strings."
TIME should be a time value.
The Gregorian date Sunday, December 31, 1bce is imaginary."
(let* ((tim (decode-time time))
- (year (
nth 5
tim)))
+ (year (
decoded-time-year
tim)))
(+ (time-date--day-in-year tim) ; Days this year
(* 365 (1- year)) ; + Days in prior years
(/ (1- year) 4) ; + Julian leap years