Skip to content

Count page views and project clicks with PostHog (EU servers)? It loads only if you choose Allow. Privacy

Date Calculator live preview
All projects

Date Calculator

Count the days between two dates or shift a date without a spreadsheet formula.

Counting days between dates or adding a duration meant reaching for spreadsheet formulas or a clunky calculator site.

Tech Domain · Book Dev|Published|Evidence: Live|Next.js, TypeScript

A public deployment is available to try.

Case Study

Before

Counting days between dates and adding durations to specific dates required spreadsheet formulas or clunky online calculators.

After

The page gives instant calendar-day arithmetic for deadlines and planning, entirely in the browser.

How it's solved

Built a date calculator, now at /date-calculator in the Devtools Workbench suite, that shows the difference between two dates in days, weeks, and approximate months, and adds or subtracts days, weeks, or months from a base date.

Trade-offs

Calendar days only: no working-day or holiday handling and no timezone choice (dates use a fixed Bangkok calendar). The month difference is an average of 30.44 days.

Related Articles

Further reading on related topics from the blog

Related Projects

More in Tech Domain · Book Dev