emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e9e1b0a 07/13: Use decoded time accessors in time-d


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master e9e1b0a 07/13: Use decoded time accessors in time-date
Date: Tue, 30 Jul 2019 07:12:06 -0400 (EDT)

branch: master
commit e9e1b0af354aa1672429729ff1e0f48370ce362f
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Use decoded time accessors in time-date
    
    * lisp/calendar/time-date.el (time-to-days): Use decoded time
    accessors.
---
 lisp/calendar/time-date.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index d299dc5..e195f71 100644
--- 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]