Date Calculator
Days Between Two Dates
Add to or Subtract from a Date
Date calculator: fast differences and precise date math
1) Core idea
Two modes: (a) days between two dates with an optional “include end day”, and (b) add/subtract years, months, weeks, days from a base date.
2) Flow you can trust
- Calendar pickers enforce DD/MM/YYYY.
- Calendar difference is computed in years → months → days for real‑world month lengths.
- Totals use exact millisecond differences; “include end day” adds one day to the final count.
- Add/Subtract applies years, months, then weeks/days for realistic rollovers.
3) Sanity checks
- End date must not precede start date.
- Month lengths and leap years are handled automatically.
- Local timezone can affect boundaries near midnight.
4) Shortcuts
- Tick “Include end day” for inclusive ranges (e.g., project spans).
- Use weeks when planning sprints; switch to days for exact deadlines.
5) Pitfalls
- Adding months to the 31st lands on the last valid day in shorter months.
- Cross‑DST changes can shift local clock time though calendar math remains correct.
6) Micro examples
- 01/01/2024 → 01/03/2024 = 0 years, 2 months, 0 days; total days 60 (leap year).
- Add 1 month to 31/01/2025 = 28/02/2025 (last day of Feb in 2025).
7) Mini‑FAQ
- What’s “include end day”? Treats both start and end as counted days; adds +1 to the day total.
- Why do calendar units differ from total days? Months vary in length; totals are pure time delta.
8) Action tip
Save a base date; iterate add/subtract values to test alternative schedules without retyping.