aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBasil L. Contovounesios2019-08-01 14:07:18 +0300
committerBasil L. Contovounesios2019-08-01 14:07:18 +0300
commit3c31775527acbd3c4fdf47d01b8db28e7d78ecd3 (patch)
tree9b611c86571d56f8db5bd226b1098e31f775596e
parentb22b59c77bf15edd4b4fa1969ce0e20402de1104 (diff)
downloademacs-3c31775527acbd3c4fdf47d01b8db28e7d78ecd3.tar.gz
emacs-3c31775527acbd3c4fdf47d01b8db28e7d78ecd3.zip
; Use more decoded time accessors in time-date.el
These were overlooked in a recent change. * lisp/calendar/time-date.el (time-date--day-in-year): Use decoded time accessors.
-rw-r--r--lisp/calendar/time-date.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 32ba1286895..5b82b8ab0fa 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -216,9 +216,9 @@ DATE1 and DATE2 should be date-time strings."
216 216
217(defun time-date--day-in-year (tim) 217(defun time-date--day-in-year (tim)
218 "Return the day number within the year corresponding to the decoded time TIM." 218 "Return the day number within the year corresponding to the decoded time TIM."
219 (let* ((month (nth 4 tim)) 219 (let* ((month (decoded-time-month tim))
220 (day (nth 3 tim)) 220 (day (decoded-time-day tim))
221 (year (nth 5 tim)) 221 (year (decoded-time-year tim))
222 (day-of-year (+ day (* 31 (1- month))))) 222 (day-of-year (+ day (* 31 (1- month)))))
223 (when (> month 2) 223 (when (> month 2)
224 (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10))) 224 (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10)))