mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-02 00:27:49 +01:00
Add minutes to hourly weather forecast time display (#8182)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
@@ -9,3 +9,12 @@ export const formatDate = toLocaleDateStringSupportsOptions
|
||||
day: "numeric",
|
||||
})
|
||||
: (dateObj: Date) => format(dateObj, "longDate");
|
||||
|
||||
export const formatDateWeekday = toLocaleDateStringSupportsOptions
|
||||
? (dateObj: Date, locales: string) =>
|
||||
dateObj.toLocaleDateString(locales, {
|
||||
weekday: "long",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
})
|
||||
: (dateObj: Date) => format(dateObj, "dddd, MMM D");
|
||||
|
||||
Reference in New Issue
Block a user