mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
decoded-time-add: Use 'floor'
* lisp/calendar/time-date.el (decoded-time-add): Use 'floor' to count new year field value. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
7f925b06ac
commit
0c80d3bee6
1 changed files with 1 additions and 1 deletions
|
|
@ -547,7 +547,7 @@ changes in daylight saving time are not taken into account."
|
|||
(when (decoded-time-month delta)
|
||||
(let ((new (+ (1- (decoded-time-month time)) (decoded-time-month delta))))
|
||||
(setf (decoded-time-month time) (1+ (mod new 12)))
|
||||
(incf (decoded-time-year time) (- (/ new 12) (if (< new 0) 1 0)))))
|
||||
(incf (decoded-time-year time) (floor new 12))))
|
||||
|
||||
;; Adjust for month length (as described in the doc string).
|
||||
(setf (decoded-time-day time)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue