fix date string in vote message
This commit is contained in:
parent
fdfe7ce404
commit
137d156981
@ -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}`
|
||||||
}
|
}
|
||||||
|
@ -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')
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user