Fix: timezone offset for today was missing
This commit is contained in:
parent
36d1568a76
commit
de9905a14e
|
@ -27,14 +27,11 @@
|
||||||
([ms today-format-fn]
|
([ms today-format-fn]
|
||||||
(let [date (from-long ms)
|
(let [date (from-long ms)
|
||||||
local (plus date time-zone-offset)
|
local (plus date time-zone-offset)
|
||||||
today-date (t/today)
|
today (t/today-at-midnight)
|
||||||
today (date-time (t/year today-date)
|
|
||||||
(t/month today-date)
|
|
||||||
(t/day today-date))
|
|
||||||
yesterday (plus today (days -1))]
|
yesterday (plus today (days -1))]
|
||||||
(cond
|
(cond
|
||||||
(before? local yesterday) (unparse (formatter "dd MMM hh:mm") local)
|
(before? date yesterday) (unparse (formatter "dd MMM hh:mm") local)
|
||||||
(before? local today) (label :t/datetime-yesterday)
|
(before? date today) (label :t/datetime-yesterday)
|
||||||
:else (today-format-fn local)))))
|
:else (today-format-fn local)))))
|
||||||
|
|
||||||
(defn day-relative [ms]
|
(defn day-relative [ms]
|
||||||
|
|
Loading…
Reference in New Issue