Example
Input (between mode)
Start: 1995-06-15 End: 2026-05-13
Output
Exact: 30 years 10 months 28 days Total days: 11,290 Total weeks: 1,612w 6d Total hours: 270,960 Total mins: 16,257,600
Note
Four modes: between / add / convert / D-day. The D-day mode adds labeled dates as D-N · D-Day · D+N entries, sorted by proximity — stored in localStorage.
Usage / FAQ
When to use
- Compute project, contract, or warranty durations
- Track anniversaries or vacation D-days (persisted in localStorage)
- Find date + N days = which date (deadlines, …)
- See how many days since a user signed up (customer success)
- Accurate duration math that respects leap years and varying month lengths
FAQ
- Q.Is every year 365 days?
- A.No — leap years have 366. This tool gets it right. Outputs like "30 years 10 months 28 days" follow the actual calendar and can differ from naive `days / 365`.
- Q.Why are some D-days negative?
- A.Sorted by absolute proximity. A D+5 event (5 days ago) may sit closer to today than a D-30 (30 days away), so they're shown together by closeness in time.
- Q.My D-day list disappeared!
- A.Stored only in localStorage — clearing browser data, using incognito mode, or moving to another device loses it. Back up important dates in a calendar too.
Fun facts
The Julian Day Number was introduced in 1583 by astronomer Joseph Scaliger — a continuous day count with epoch January 1, 4713 BC. He picked a far-enough-back start so that every astronomical and historical event could be compared as a single number. 'Julian' is named for his father, Julius.
Wikipedia — Julian dayWhen the Gregorian calendar arrived in 1582, Catholic countries skipped from Thursday, October 4, to Friday, October 15 — a 10-day jump to fix accumulated Easter-calculation drift. Britain and the US made the switch in 1752 with an 11-day jump (Sept 2 → Sept 14), and some Orthodox countries kept the Julian calendar into the 20th century.
Wikipedia — Gregorian calendarThe Gregorian leap-year rule is '4, but not 100, except 400' — so 2000 was a leap year while 1900 and 2100 are not. The 365.2425-day average is just 26 seconds off the true tropical year (365.24219), drifting by about a day every 3,000 years.
Wikipedia — Leap year
Related guides
- Timezone Pitfalls in JavaScript — UTC, IANA, DST, and Storing Dates Right
Why JS Date is dangerous, why you should always store UTC, the difference between offset and IANA name, daylight saving traps, and the right way to format for users.
- How Unix Time Actually Works
Why 1970, why Unix time isn't actually monotonic, the Y2038 problem on 32-bit systems, the leap-second mess, monotonic vs wall clocks, and why "now()" can go backwards.
Related tools
- Unix Timestamp Converter
Convert between Unix timestamps (seconds/milliseconds) and ISO 8601 / UTC / locale time. Auto-detects input.
- Cron Expression Parser
Translate a cron expression into human-readable text and preview the next 5 run times. Locale-aware.
- Cron Expression Builder
Build a cron expression visually — pick minute / hour / day / month / weekday from presets or free input. Preview human-readable text and next 5 run times.
- Time Zone Converter
Convert datetime between IANA time zones using the browser's Intl API.
- Date Formatter
Format a date with patterns (YYYY-MM-DD HH:mm:ss). Live preview of common formats.
- Pomodoro Timer
Full-screen Pomodoro timer that alternates focus and break sessions. Custom durations, color, sound, and fullscreen for desk use.