fix date string in vote message

This commit is contained in:
kenobi 2023-07-17 22:48:57 +02:00
parent fdfe7ce404
commit 137d156981
2 changed files with 3 additions and 3 deletions

View File

@ -18,6 +18,6 @@ export function createDateStringFromEvent(eventStartDate:Date, requestId: string
return `heute um ${time}` return `heute um ${time}`
} }
const date = format(zonedDateTime, "eeee dd.MM", { locale: de }) const date = format(zonedDateTime, "eeee dd.MM.", { locale: de })
return `am ${date} um ${time}` return `am ${date} um ${time}`
} }

View File

@ -10,6 +10,6 @@ function getTestDate(date: string): Date {
} }
test('createDateStringFromEvent - correct formatting', () => { test('createDateStringFromEvent - correct formatting', () => {
expect(createDateStringFromEvent(getTestDate('01-01-2023 12:30'), "")).toEqual('heute um 12:30') expect(createDateStringFromEvent(getTestDate('01-01-2023 12:30'), "")).toEqual('heute um 12:30')
expect(createDateStringFromEvent(getTestDate('01-02-2023 12:30'), "")).toEqual('am Montag 02.01 um 12:30') expect(createDateStringFromEvent(getTestDate('01-02-2023 12:30'), "")).toEqual('am Montag 02.01. um 12:30')
expect(createDateStringFromEvent(getTestDate('01-03-2023 12:30'), "")).toEqual('am Dienstag 03.01 um 12:30') expect(createDateStringFromEvent(getTestDate('01-03-2023 12:30'), "")).toEqual('am Dienstag 03.01. um 12:30')
}) })