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:
@@ -4,6 +4,7 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { longDateFormat } from "@/constants/dateFormats"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import useLang from "@/hooks/useLang"
|
||||
@@ -82,8 +83,8 @@ export default function PriceDetailsTable({
|
||||
{ totalNights: nights }
|
||||
)
|
||||
|
||||
const arrival = dt(fromDate).locale(lang).format("ddd, D MMM")
|
||||
const departue = dt(toDate).locale(lang).format("ddd, D MMM")
|
||||
const arrival = dt(fromDate).locale(lang).format(longDateFormat[lang])
|
||||
const departue = dt(toDate).locale(lang).format(longDateFormat[lang])
|
||||
const duration = ` ${arrival} - ${departue} (${nightsMsg})`
|
||||
|
||||
const isAllBreakfastIncluded = rooms.every((room) => room.breakfastIncluded)
|
||||
|
||||
Reference in New Issue
Block a user