Date Matrix Creator
Generate customizable date matrices with flexible formats, intervals, and export options. Create date grids for planning, scheduling, and data analysis.
About
A date matrix is a two-dimensional grid where each cell contains a date value computed from a starting point, interval, and fill pattern. This structure appears in project timelines, fiscal calendars, sprint planning boards, and scientific data collection schedules. Manual creation in spreadsheets introduces transcription errors - off-by-one mistakes in month boundaries, incorrect leap year handling, or timezone-induced date shifts. The cost compounds: a single misaligned date in a 52-week production schedule cascades into missed deadlines and contractual penalties.
This tool generates matrices using the proleptic Gregorian calendar with proper handling of variable-length months (accounting for the 28/29/30/31 day variance) and leap year rules (divisible by 4, except centuries unless divisible by 400). Output formats follow ISO 8601 standards when applicable. The matrix populates in row-major order by default, with options for column-major fill, random distribution, or custom stride patterns. Export to CSV preserves Excel/Sheets compatibility; JSON export maintains type fidelity for programmatic consumption.
Formulas
Each cell value Ci,j in the matrix is computed from the base date D0 plus an offset determined by the cell's linear index and the selected interval:
Where k is the linear index calculated based on fill direction:
The interval Δt supports multiple units: 1 day, 7 days (week), 1 month, 1 year. Month and year intervals use calendar arithmetic rather than fixed millisecond offsets to preserve day-of-month alignment where possible.
ISO week number W follows the ISO 8601 definition: week 1 contains the first Thursday of the year. Calculated as:
Leap year determination follows the Gregorian rule:
Reference Data
| Format Token | Output Example | Description |
|---|---|---|
YYYY | 2025 | 4-digit year |
YY | 25 | 2-digit year |
MM | 01 - 12 | Month (zero-padded) |
M | 1 - 12 | Month (no padding) |
MMM | Jan, Feb, Mar | Month abbreviation |
MMMM | January, February | Full month name |
DD | 01 - 31 | Day of month (zero-padded) |
D | 1 - 31 | Day of month (no padding) |
ddd | Mon, Tue, Wed | Weekday abbreviation |
dddd | Monday, Tuesday | Full weekday name |
d | 0 - 6 | Day of week (0=Sunday) |
HH | 00 - 23 | Hour (24h, zero-padded) |
hh | 01 - 12 | Hour (12h, zero-padded) |
mm | 00 - 59 | Minutes (zero-padded) |
ss | 00 - 59 | Seconds (zero-padded) |
A | AM, PM | Meridiem (uppercase) |
a | am, pm | Meridiem (lowercase) |
W | 1 - 53 | ISO week number |
WW | 01 - 53 | ISO week (zero-padded) |
Q | 1 - 4 | Quarter of year |
DDD | 1 - 366 | Day of year |
X | 1735689600 | Unix timestamp (seconds) |
x | 1735689600000 | Unix timestamp (milliseconds) |
[text] | text | Escaped literal text |