diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-30 13:02:41 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-30 13:02:41 +0200 |
commit | 3c4eb0d190ec5d28d5798b346fcde701fd919d1b (patch) | |
tree | c939246aee1031aa9bce17805b701371fb4f3608 /lisp/proced.el | |
parent | 8a30f0414ec4145ca3684639c6ce1edeeb3f3331 (diff) | |
download | emacs-3c4eb0d190ec5d28d5798b346fcde701fd919d1b.tar.gz |
Use decoded time accessors in proced
* lisp/proced.el (proced-format-start): Use decoded time accessors.
Diffstat (limited to 'lisp/proced.el')
-rw-r--r-- | lisp/proced.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/proced.el b/lisp/proced.el index b05046bfbd3..5f35fa34a07 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -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))))) |