--- import { defined } from "@utils/anonymous"; interface Props { date?: Date; years: number[]; months: number[]; days?: number[]; } const { date, years, months, days } = Astro.props; const dateParts = Astro.params.date?.split("/").map(Number); const y = dateParts?.[0]; const m = dateParts?.[1]; const d = dateParts?.[2]; let yI = 0; let mI = 0; let dI = 0; const list = new Intl.ListFormat("pt-PT", { type: "unit", style: "narrow" }); const pad = (n: number) => String(n).padStart(2, "0"); ---