Merged in fix/SW-2801-correct-date-formats (pull request #2400)

fix(SW-2801): Added lang specific date formats

* fix(SW-2801): Added lang specific date formats

* fix: wrong type import


Approved-by: Michael Zetterberg
This commit is contained in:
Tobias Johansson
2025-06-25 11:12:28 +00:00
parent c0efbd17ff
commit 8272327993
18 changed files with 114 additions and 33 deletions

View File

@@ -1,5 +1,6 @@
import { Typography } from "@scandic-hotels/design-system/Typography"
import { longDateWithYearFormat } from "@/constants/dateFormats"
import { dt } from "@/lib/dt"
import { getIntl } from "@/i18n"
@@ -71,7 +72,9 @@ export default async function Footer({ booking, room }: FooterProps) {
</Typography>
<Typography variant="Body/Supporting text (caption)/smRegular">
<dd>
{dt(booking.checkInDate).locale(lang).format("ddd, D MMM YYYY")}
{dt(booking.checkInDate)
.locale(lang)
.format(longDateWithYearFormat[lang])}
</dd>
</Typography>
</div>
@@ -86,7 +89,9 @@ export default async function Footer({ booking, room }: FooterProps) {
</Typography>
<Typography variant="Body/Supporting text (caption)/smRegular">
<dd>
{dt(booking.checkOutDate).locale(lang).format("ddd, D MMM YYYY")}
{dt(booking.checkOutDate)
.locale(lang)
.format(longDateWithYearFormat[lang])}
</dd>
</Typography>
</div>