feat(sw-697): changed to dt instead of differenceInCalendarDays
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { differenceInCalendarDays } from "date-fns"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
@@ -41,7 +42,7 @@ export default function RateSummary({
|
||||
|
||||
const checkInDate = new Date(roomsAvailability.checkInDate)
|
||||
const checkOutDate = new Date(roomsAvailability.checkOutDate)
|
||||
const nights = differenceInCalendarDays(checkOutDate, checkInDate)
|
||||
const nights = dt(checkOutDate).diff(dt(checkInDate), "days")
|
||||
|
||||
return (
|
||||
<div className={styles.summary}>
|
||||
|
||||
Reference in New Issue
Block a user