Date Interval Visualizer
Visualize and compare date intervals with timeline charts. Calculate durations, business days, overlaps between multiple date ranges.
About
Misreading date intervals causes project overruns, contract disputes, and scheduling failures. A span of 90 calendar days contains only 64 business days assuming standard weekends. This tool computes precise durations using Gregorian calendar rules, accounting for variable month lengths (28 - 31 days) and leap year corrections. The overlap detection algorithm identifies conflicting date ranges in O(n2) comparisons.
Duration breakdown converts total milliseconds into years, months, and days via successive subtraction rather than simple division. This produces human-readable output matching how people count intervals. Business day calculations exclude weekends but not regional holidays. For compliance with ISO 8601 or project management standards like PMBOK, verify results against your organization's working calendar.
Formulas
The precise duration between two dates d1 and d2 requires calendar-aware computation. Total milliseconds provide the base measurement.
Conversion to larger units uses integer division with remainders.
Business days exclude weekends via day-of-week filtering.
Where dow(d) returns 0 for Sunday through 6 for Saturday. Overlap detection between intervals A and B uses.
The year-month-day breakdown subtracts components sequentially, borrowing from larger units when days become negative, similar to manual calendar counting.
Reference Data
| Interval Type | Days | Business Days | Hours | Common Use |
|---|---|---|---|---|
| 1 Week | 7 | 5 | 168 | Sprint cycles, weekly reports |
| 2 Weeks | 14 | 10 | 336 | Payroll periods, biweekly sprints |
| 1 Month (avg) | 30.44 | 22 | 730 | Subscription billing, monthly reports |
| 1 Quarter | 91.31 | 65 | 2,191 | Fiscal quarters, OKR cycles |
| 6 Months | 182.63 | 130 | 4,383 | Performance reviews, lease terms |
| 1 Year (common) | 365 | 261 | 8,760 | Annual contracts, fiscal years |
| 1 Year (leap) | 366 | 262 | 8,784 | Leap year calculations |
| 5 Years | 1,826 | 1,305 | 43,830 | Strategic planning, warranties |
| 10 Years | 3,652 | 2,609 | 87,660 | Long-term investments |
| January | 31 | 23 | 744 | Fixed 31-day month |
| February (common) | 28 | 20 | 672 | Shortest month |
| February (leap) | 29 | 21 | 696 | Leap year February |
| 30-day month | 30 | 22 | 720 | Apr, Jun, Sep, Nov |
| 31-day month | 31 | 23 | 744 | Jan, Mar, May, Jul, Aug, Oct, Dec |
| Work week | 5 | 5 | 40 | Standard 8-hour days |
| Notice period (US) | 14 | 10 | 336 | Two-week notice standard |
| Trial period | 90 | 64 | 2,160 | Probationary employment |
| Semester | 120 | 86 | 2,880 | Academic semesters |
| Statute limit (3yr) | 1,095 | 782 | 26,280 | Legal statute of limitations |