MonthGridtype
The weeks of a month: whole weeks of seven days.
Import it
import type { MonthGrid } from "@johnmorrisdotca/koyomi-calendars/month";
Definition
interface MonthGrid {
year: number;
month: number;
weekStart: WeekStart;
daysInMonth: number;
offset: number;
weeks: MonthDay[][];
}
Members
| Name | Type | Description |
|---|---|---|
year | number | |
month | number | |
weekStart | WeekStart | |
daysInMonth | number | |
offset | number | Cells before the 1st in the first week. |
weeks | MonthDay[][] | 4, 5 or 6 weeks of seven. |
Examples
import { monthGrid, type MonthGrid } from "@johnmorrisdotca/koyomi-calendars/month";
const grid: MonthGrid = monthGrid(2026, 11);
console.log(grid.weeks.length, grid.daysInMonth);5 30What it prints (run when this page was built)