This commit is contained in:
2026-04-19 12:59:18 +02:00
parent c01876ad81
commit 7065cb3945
8 changed files with 347 additions and 25 deletions
+1 -1
View File
@@ -207,7 +207,7 @@
let occupied = 0;
for (let d = 1; d <= days; d++) {
const ds = `${today.getFullYear()}-${String(today.getMonth()+1).padStart(2,'0')}-${String(d).padStart(2,'0')}`;
if (calEvents.some(e => ds >= e.start_date && ds < e.end_date)) occupied++;
if (calEvents.some(e => ds >= e.start_date && (e.source === 'airbnb' ? ds < e.end_date : ds <= e.end_date))) occupied++;
}
return days > 0 ? Math.round((occupied/days)*100) : 0;
})();