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 { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { shortDateFormat } from "@/constants/dateFormats"
|
||||
import { dt } from "@/lib/dt"
|
||||
import { useMyStayStore } from "@/stores/my-stay"
|
||||
|
||||
@@ -19,9 +20,9 @@ export default function Dates() {
|
||||
checkOutDate: state.bookedRoom.checkOutDate,
|
||||
}))
|
||||
|
||||
const from = dt(checkInDate).locale(lang).format("D MMM")
|
||||
const from = dt(checkInDate).locale(lang).format(shortDateFormat[lang])
|
||||
const fromYear = dt(checkInDate).year()
|
||||
const to = dt(checkOutDate).locale(lang).format("D MMM")
|
||||
const to = dt(checkOutDate).locale(lang).format(shortDateFormat[lang])
|
||||
const toYear = dt(checkOutDate).year()
|
||||
|
||||
const isSameYear = fromYear === toYear
|
||||
|
||||
Reference in New Issue
Block a user