mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 13:56:35 +00:00
Timezone support for displaying header with date in logbook (#2026)
* Fixed display header with date in logbook * prettier fix
This commit is contained in:
parent
9c2b85dd6e
commit
9f55678cb3
@ -99,7 +99,9 @@ class HaLogbook extends EventsMixin(PolymerElement) {
|
|||||||
const current = this.get("when", change.base[index]);
|
const current = this.get("when", change.base[index]);
|
||||||
const previous = this.get("when", change.base[index - 1]);
|
const previous = this.get("when", change.base[index - 1]);
|
||||||
return (
|
return (
|
||||||
current && previous && current.substr(0, 10) !== previous.substr(0, 10)
|
current &&
|
||||||
|
previous &&
|
||||||
|
new Date(current).toDateString() !== new Date(previous).toDateString()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user