]> git.eshelyaron.com Git - emacs.git/commitdiff
Use decoded time accessors in proced
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:02:41 +0000 (13:02 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:02:41 +0000 (13:02 +0200)
* lisp/proced.el (proced-format-start): Use decoded time accessors.

lisp/proced.el

index b05046bfbd3a0d57a3f1c5d5b011c0442320355d..5f35fa34a070e7c8b566bf0e05941c40c8058fcd 100644 (file)
@@ -1367,12 +1367,12 @@ Prefix ARG controls sort order, see `proced-sort-interactive'."
 The return string is always 6 characters wide."
   (let ((d-start (decode-time start))
         (d-current (decode-time)))
-    (cond ( ;; process started in previous years
-           (< (nth 5 d-start) (nth 5 d-current))
+    (cond (;; process started in previous years
+           (< (decoded-time-year d-start) (decoded-time-year d-current))
            (format-time-string "  %Y" start))
           ;; process started today
-          ((and (= (nth 3 d-start) (nth 3 d-current))
-                (= (nth 4 d-start) (nth 4 d-current)))
+          ((and (= (decoded-time-day d-start) (decoded-time-day d-current))
+                (= (decoded-time-month d-start) (decoded-time-month d-current)))
            (format-time-string " %H:%M" start))
           (t ;; process started this year
            (format-time-string "%b %e" start)))))