feat: add Price details modal
This commit is contained in:
+13
-1
@@ -1,4 +1,6 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
import d from "dayjs"
|
||||
|
||||
import type { Lang } from "@/constants/languages"
|
||||
|
||||
/**
|
||||
* Get the localized month name for a given month index and language
|
||||
@@ -13,3 +15,13 @@ export function getLocalizedMonthName(monthIndex: number, lang: Lang) {
|
||||
|
||||
return monthName.charAt(0).toUpperCase() + monthName.slice(1)
|
||||
}
|
||||
|
||||
export function getNights(start: string, end: string) {
|
||||
const range = []
|
||||
let current = d(start)
|
||||
while (current.isBefore(end)) {
|
||||
range.push(current)
|
||||
current = current.add(1, "days")
|
||||
}
|
||||
return range
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user