fix: show local dates for range in album summary (#15654)

* fix(web): show local dates for range in album summary

* fix(server): show local dates for range in album summary
This commit is contained in:
Carsten Otto 2025-01-28 21:33:38 +01:00 committed by GitHub
parent cb6d94c7a7
commit da580d4685
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 17 additions and 20 deletions

View file

@ -11,7 +11,10 @@
let { album }: Props = $props();
const formatDate = (date?: string) => {
return date ? new Date(date).toLocaleDateString($locale, dateFormats.album) : undefined;
const dateWithoutTimeZone = date?.slice(0, -1);
return dateWithoutTimeZone
? new Date(dateWithoutTimeZone).toLocaleDateString($locale, dateFormats.album)
: undefined;
};
const getDateRange = (start?: string, end?: string) => {