mirror of https://github.com/djcb/mu.git
* mu4e: show 'None' as date for (0 0 0) in :human-date
This commit is contained in:
parent
1aec1e2f7c
commit
aa96833a31
|
@ -386,15 +386,17 @@ otherwise ; show the from address; prefixed with the appropriate
|
||||||
If the date is today, show the time, otherwise, show the
|
If the date is today, show the time, otherwise, show the
|
||||||
date. The formats used for date and time are
|
date. The formats used for date and time are
|
||||||
`mu4e-headers-date-format' and `mu4e-headers-time-format'."
|
`mu4e-headers-date-format' and `mu4e-headers-time-format'."
|
||||||
(let* ((date (mu4e-msg-field msg :date))
|
(let ((date (mu4e-msg-field msg :date)))
|
||||||
(day1 (decode-time date))
|
(if (equal date '(0 0 0))
|
||||||
(day2 (decode-time (current-time))))
|
"None"
|
||||||
(if (and
|
(let ((day1 (decode-time date))
|
||||||
(eq (nth 3 day1) (nth 3 day2)) ;; day
|
(day2 (decode-time (current-time))))
|
||||||
(eq (nth 4 day1) (nth 4 day2)) ;; month
|
(if (and
|
||||||
(eq (nth 5 day1) (nth 5 day2))) ;; year
|
(eq (nth 3 day1) (nth 3 day2)) ;; day
|
||||||
(format-time-string mu4e-headers-time-format date)
|
(eq (nth 4 day1) (nth 4 day2)) ;; month
|
||||||
(format-time-string mu4e-headers-date-format date))))
|
(eq (nth 5 day1) (nth 5 day2))) ;; year
|
||||||
|
(format-time-string mu4e-headers-time-format date)
|
||||||
|
(format-time-string mu4e-headers-date-format date))))))
|
||||||
|
|
||||||
|
|
||||||
(defsubst mu4e~headers-mailing-list (list)
|
(defsubst mu4e~headers-mailing-list (list)
|
||||||
|
|
Loading…
Reference in New Issue