Between Two DatesAbout

About Between Two Dates

Between Two Dates is a set of date and age calculators: add or subtract time from a date, find the span between two dates, calculate an exact age, work out business days, ISO week numbers, Julian Day Numbers, and pregnancy due dates. Every page shares one underlying calendar engine, so the same day is always counted the same way no matter which tool you land on.

How the dates are worked out

The engine is a from-scratch implementation (no third-party date library), built on the well-known days_from_civil / civil_from_days algorithm for converting between a calendar date and a day count, which is correct for the entire proleptic Gregorian calendar, including leap years back to year 0. Everything else — adding months with end-of-month clamping, calendar-aware age differences, ISO 8601 week numbers, Julian Day Numbers, and business-day counting — is built on top of that day count, entirely in your browser. There is no timezone or daylight-saving time anywhere in the calculation: every date is treated as a calendar day, not a moment in time, except the countdown page, which necessarily uses your device's clock.

How it was checked

Before any page was built, the engine was tested against more than a hundred hand-derived expectations — known leap-year edge cases, published Julian Day Number anchors, and weekdays worked out independently by Zeller's congruence — then cross-checked again against Python's standard library date module, a completely separate implementation, to catch anything both the code and its own test author might have gotten wrong the same way.

Who built this

Behind Between Two Dates is Elbert Ballo, who wrote and tested the calendar engine solo. The second, independent implementation used to cross-check it above -- Python's date module -- was picked specifically because it's mature and wasn't written by the same person double-checking his own code.

What it doesn't do

It doesn't save what you enter, need an account, or know anything about you. The due-date and gestational-age pages use Naegele's rule, a 280-day rule of thumb, not a medical calculation — see the Terms page. Business-day results assume the standard US federal holiday calendar unless you turn that off.

Corrections

If a date, rule or number here is wrong, email hello@betweentwodates.com.