Calendar Date Validator
Validate any calendar date instantly. Check Gregorian & Julian dates, leap years, day-of-week, ISO week number, and Julian Day Number.
About
An invalid date propagated through a financial system, a database, or an engineering log can corrupt records irreversibly. February 29 in a non-leap year, September 31, or any date falling within the Gregorian reform gap (October 5-14, 1582) are common sources of silent data corruption. This tool validates dates against the full proleptic Gregorian and Julian calendar rule sets. It computes the leap year status using the divisibility chain (y รท 4, exception at 100, counter-exception at 400 for Gregorian; simple y รท 4 for Julian), resolves the day of week via Zeller's congruence, and outputs the Julian Day Number for astronomical cross-referencing.
The validator rejects impossible dates outright and flags ambiguous historical dates near the 1582 reform boundary. It also returns the ISO 8601 week number, the day-of-year ordinal, and the quarter. Note: this tool uses the proleptic Gregorian calendar for dates before October 15, 1582, which is a mathematical extension and may not match historical records of regions that adopted the Gregorian reform later (e.g., Britain in 1752, Russia in 1918). Pro tip: always specify which calendar system your source data uses before storing historical dates.
Formulas
Gregorian leap year predicate:
Where y = year, L = TRUE if leap year.
Julian Day Number (Gregorian calendar):
Where y = year, m = month, d = day.
Zeller's congruence for day of week (Gregorian):
Where q = day of month, m = month (3 = March โฆ 14 = February, with Jan/Feb counted as months 13/14 of the previous year), K = year of century (y mod 100), J = zero-based century (floor(y รท 100)), h = day of week (0 = Saturday โฆ 6 = Friday).
ISO 8601 week number is computed by finding the Thursday of the target week and counting weeks from January 1 of that Thursday's year.
Reference Data
| Month | Days (Common Year) | Days (Leap Year) | Quarter | Day-of-Year Start (Common) | Day-of-Year Start (Leap) |
|---|---|---|---|---|---|
| January | 31 | 31 | Q1 | 1 | 1 |
| February | 28 | 29 | Q1 | 32 | 32 |
| March | 31 | 31 | Q1 | 60 | 61 |
| April | 30 | 30 | Q2 | 91 | 92 |
| May | 31 | 31 | Q2 | 121 | 122 |
| June | 30 | 30 | Q2 | 152 | 153 |
| July | 31 | 31 | Q3 | 182 | 183 |
| August | 31 | 31 | Q3 | 213 | 214 |
| September | 30 | 30 | Q3 | 244 | 245 |
| October | 31 | 31 | Q4 | 274 | 275 |
| November | 30 | 30 | Q4 | 305 | 306 |
| December | 31 | 31 | Q4 | 335 | 336 |
| Gregorian Leap Year Rule | |||||
| Divisible by 4 | Leap year candidate | ||||
| Divisible by 100 | Not a leap year (exception) | ||||
| Divisible by 400 | Leap year (counter-exception) | ||||
| Julian Leap Year Rule | |||||
| Divisible by 4 | Always a leap year | ||||
| Notable Calendar Reform Dates | |||||
| Gregorian reform (Papal) | Oct 15, 1582 | ||||
| Britain & colonies | Sep 14, 1752 | ||||
| Russia | Feb 14, 1918 | ||||
| Greece | Mar 1, 1923 | ||||
| Turkey | Jan 1, 1926 | ||||
| ISO 8601 Week Numbering | |||||
| Week starts on | Monday | ||||
| Week 1 contains | January 4 | ||||
| Weeks per year | 52 or 53 | ||||