Date Sequence Generator
Generate custom date sequences with configurable intervals, formats, and exclusion rules. Supports ISO, US, EU formats and weekend/holiday filtering.
About
Generating accurate date sequences requires handling edge cases that break naive implementations: leap years shifting February boundaries, month-end overflow when stepping by months (January 31 + 1 month ≠ February 31), and timezone-induced date shifts at midnight. This tool implements proper calendar arithmetic following ISO 8601 standards, correctly rolling dates forward when target days don't exist in shorter months. The exclusion engine filters weekends via getDay ∈ {0, 6} and matches custom holiday sets with O(1) hash lookups.
Financial systems calculating payment schedules, project managers building Gantt timelines, and data analysts generating test fixtures all require deterministic date lists. A spreadsheet drag-fill fails silently on month boundaries and can't exclude business days. This generator caps output at 10,000 entries to prevent browser memory exhaustion while providing instant CSV export for external processing.
Formulas
The sequence generator produces dates from start S to end E with step interval k in unit u. The output set D is defined as:
Where S = start date, E = end date, k = step value (integer ≥ 1), u = unit multiplier (day = 1, week = 7, month/year via calendar arithmetic), X = exclusion set (weekends ∪ holidays), i = iteration index from 0 to n.
Leap year detection uses the Gregorian rule:
Month stepping handles day overflow by clamping to month-end: if target day > days in target month, set day = last day of month. ISO week number calculation follows ISO 8601: week 1 contains January 4th.
Reference Data
| Format Token | Output Example | Description |
|---|---|---|
| YYYY | 2025 | 4-digit year |
| YY | 25 | 2-digit year |
| MM | 07 | Month with leading zero (01-12) |
| M | 7 | Month without leading zero (1-12) |
| DD | 04 | Day with leading zero (01-31) |
| D | 4 | Day without leading zero (1-31) |
| MMMM | January | Full month name |
| MMM | Jan | Abbreviated month name |
| DDDD | Friday | Full weekday name |
| DDD | Fri | Abbreviated weekday name |
| Q | 3 | Quarter (1-4) |
| WW | 27 | ISO week number (01-53) |
| UNIX | 1751673600 | Unix timestamp (seconds) |
| ISO | 2025-07-04 | ISO 8601 format |
| Step Units Reference | ||
| Days | 1-9999 | Calendar days including weekends |
| Weeks | 1-1428 | 7-day intervals |
| Months | 1-600 | Calendar months (day overflow handled) |
| Years | 1-100 | Full calendar years |
| Common Exclusion Patterns | ||
| Weekends | Sat, Sun | Excludes getDay = 0 or 6 |
| US Federal Holidays | 10 days/year | New Year, MLK Day, Presidents Day, etc. |
| EU Bank Holidays | Varies | Good Friday, Easter Monday, Christmas |
| Output Limits | ||
| Maximum Dates | 10,000 | Prevents browser memory issues |
| Date Range | 1000-9999 AD | JavaScript Date object limits |
| CSV Export | Unlimited | Downloads full sequence |