Generate calendar

Lay out one Gregorian month as a Sunday-first monospaced weekday grid.

freeworks offlinenothing uploaded
ToolCalendar Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The first UTC date supplies the leading weekday offset, Gregorian month length bounds the numbered cells, and each day occupies a fixed three-character column. UTC construction explicitly preserves years 0001–0099 instead of JavaScript’s legacy 1900 shift.

  • The current browser month and year are initial values for an immediately useful wall-calendar view.
  • Sunday-first ordering is this display’s convention; ISO weeks begin on Monday.

Worked example

January 2025 Calendar
Generate a text calendar for January 2025
Input
											Month: 1
Year: 2025
										
Output
												    January 2025
Su Mo Tu We Th Fr Sa
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
											

When to use this

Terminal notes use monospaced calendars, printable plans need weekday positions, and fixtures verify the first weekday of a month.

Edge cases

  • February 1900 has 28 days because a century year must also divide by 400, while February 2000 has 29.
  • A Saturday start inserts six empty weekday cells before day 1.
  • Year 0001 stays year 1 rather than silently becoming 1901.

References