import { addCivilDays, civilDayOfWeek } from '@/lib/schedule/civil'; import { periodsOverlap, type Period } from '@/lib/schedule/vacations'; const MONTHS_FR = [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre', ]; type LabelledPeriod = Period & { labelFr: string }; type Day = { date: string; isWeekend: boolean; label: string | null }; type Month = { key: string; label: string; days: Day[] }; /** * Twelve months from today, with closure days filled in. * * A list of date ranges is precise and hard to picture; a year at a glance is * how anyone actually checks "have I left a gap in August?". Rendered on the * server: it only changes when the data does. */ export default function YearCalendar({ from, periods, }: { from: string; periods: LabelledPeriod[]; }) { const months = buildMonths(from, periods); return (
| {month.label} |
{month.days.map((day) => (
))}
|
|---|
fermeture week-end