Merged in chore/remove-unused-code (pull request #2229)
Remove unused code * Remove unused scandic-web files * Remove unused exports Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -16,16 +16,6 @@ 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
|
||||
}
|
||||
|
||||
export function getNumberOfNights(startDate: Date, endDate: Date) {
|
||||
return d(endDate).diff(startDate, "day")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user