Fixing 24 hour forecast

This commit is contained in:
2026-06-27 00:27:42 -04:00
parent 9e7afbd98c
commit 225002046b

View File

@@ -194,6 +194,8 @@ function summarise(slots) {
// Min/max temp uses ALL slots for the full day range
const allTemps = slots.map(s => s.temperature).filter(Number.isFinite)
console.log(slots);
const labelCount = {}
for (const s of source) labelCount[s.label] = (labelCount[s.label] || 0) + 1
const label = Object.entries(labelCount).sort((a, b) => b[1] - a[1])[0][0]