Date Calc

Each input can be a date or a period, but not both periods:

  • 2 dates: get the period between them.
  • 1 date + 1 period: get the new date after adding the period to the date.

Supported date format:

  • yyyy-mm-dd: 2017-01-28
  • mm/dd/yyyy: 01/28/2017
  • mmm dd yyyy: Jan 28 2017
  • mmmm dd yyyy: January 28 2017
  • today

Supported period format:

  • i years j months k days: 1 year 2 months 3 days
  • iyjmkd: 1y2m3d

Inputs can also be specified by URL query strings p1 and p2 respectively:

https://zzpxyx.github.io/date-calc/index.html?p1=today&p2=today