Too Much Tools logoToo Much Tools

DateTime Playground

Explore dates: add/subtract, ISO week, day-of-year, leap year and diffs, locally.

Local, Runs entirely in your browser, your data never leaves your device.
Loading tool…

Add, subtract and compare dates without doing the arithmetic yourself

Working out what a date looks like ninety days from now, or how many hours sit between two timestamps, is easy to get wrong once months of different lengths and leap years are involved. This tool takes a base date and time, applies an offset you set in years, months, days, hours, minutes and seconds, and shows the result alongside its ISO week, day of year, quarter and leap-year status. It also diffs the result against a second date you choose. The arithmetic runs locally as you edit the fields.

How to use the DateTime Playground

  1. Set the Base date field to the starting date and time you want to work from.
  2. Enter values in the Add / subtract grid for years, months, days, hours, minutes or seconds; negative numbers subtract.
  3. Read the Result panel for the computed date in ISO 8601, local format, Unix seconds and other facts.
  4. Set the Compare with field to a second date to see the Difference in days, hours, minutes and seconds between the two.

Offsets are applied with JavaScript's calendar-aware date arithmetic, so adding one month to January 31 lands on the actual last valid day the runtime resolves to, rather than a fixed 30-day step, and results account for the current leap year automatically.

ISO week numbers follow ISO 8601: weeks start on Monday, and week 1 is the week containing the year's first Thursday, which is why the last days of December or first days of January can belong to a week numbered in the other year.

Frequently asked questions

How is ISO week number calculated?
Per ISO 8601, weeks start on Monday and week 1 is the week that contains the first Thursday of the year, so early January dates can fall in week 52 or 53 of the previous year and vice versa.
Does adding a month always land on the same day number?
No, JavaScript's date arithmetic rolls over to the next month when the target day does not exist, for example adding one month to January 31 can land in early March rather than February 31, which does not exist.
How do I check if a year is a leap year?
The Result panel shows Leap year as Yes or No for the computed date's year, using the standard rule: divisible by 4, except centuries, unless also divisible by 400.
What does the Difference panel compare?
It subtracts the Result date, your base date plus any offset, from the date in the Compare with field, and shows the gap in days, hours, minutes and seconds.