Custom Calendar Date Generator
Generate custom printable calendars for any month and year. Add events, choose week start day, highlight dates, and export or print your personalized calendar.
About
Generating a correct calendar grid requires resolving the weekday of the first day of any month across the full Gregorian range. An off-by-one error in the day-of-week computation shifts every date in the grid, producing a calendar that looks plausible but is factually wrong. This tool computes the weekday offset using modular arithmetic consistent with the Gregorian reform rules: a year y is a leap year if divisible by 4, except centuries not divisible by 400. Events are keyed to ISO 8601 date strings (YYYYβMMβDD) to avoid locale ambiguity. The output is a standards-compliant HTML table suitable for printing at A4 or Letter size.
Limitation: this tool covers the proleptic Gregorian calendar only. It does not account for the Julian-to-Gregorian transition gap (October 1582 in Catholic countries, later elsewhere). For dates before roughly 1582, the weekday assignment may differ from historical records. Pro tip: if you plan to print calendars for wall use, set your browser print margins to βNoneβ for maximum grid size.
Formulas
The number of days in February depends on whether year y is a leap year. The leap year predicate L(y) is defined as:
The day-of-week for the first of any month is computed via the native Date constructor, which implements the proleptic Gregorian calendar. Given month index m (0 - 11) and year y, the weekday w of day 1 is:
The grid offset o (number of blank cells before day 1) when the week starts on day s (0 = Sunday, 1 = Monday) is:
Where y = year, m = zero-indexed month, w = weekday index (Sunday = 0), s = configured week start day, o = leading empty cells in the grid.
Reference Data
| Month | Days | Notes |
|---|---|---|
| January | 31 | New Year's Day (1st) |
| February | 28 or 29 | Leap day on 29th when y mod 4 = 0 |
| March | 31 | Spring equinox ≈ 20th |
| April | 30 | Earth Day (22nd) |
| May | 31 | Memorial Day (last Mon, US) |
| June | 30 | Summer solstice ≈ 21st |
| July | 31 | Independence Day (4th, US) |
| August | 31 | No major fixed holidays |
| September | 30 | Labor Day (1st Mon, US) |
| October | 31 | Halloween (31st) |
| November | 30 | Thanksgiving (4th Thu, US) |
| December | 31 | Christmas Day (25th) |
| Leap Year Rules | ||
| Rule 1 | y mod 4 = 0 β leap candidate | |
| Rule 2 | y mod 100 = 0 β not leap (exception below) | |
| Rule 3 | y mod 400 = 0 β leap year | |
| Common Week Start Conventions | ||
| ISO 8601 | Monday is day 1 | |
| US / Canada | Sunday is day 0 | |
| Middle East | Saturday start common | |
| Notable Leap Years | ||
| 2000 | Leap (divisible by 400) | |
| 1900 | Not leap (century, not ÷ 400) | |
| 2024 | Leap | |
| 2100 | Not leap | |