Date Difference Calculator API
Time between two dates in years, months and days, plus total days, weeks and business days (Monday–Friday).
POST /api/v1/tools/date-difference-calculatorMCP date_difference_calculatorTime & DateCount the days between two dates, as years, months and days, total days and weeks, plus business days (Monday to Friday). Leap years handled.
Input
Send these as a JSON object. Unknown fields are rejected.
- start
- Start date as YYYY-MM-DD. (string, up to 10 characters, required)
- end
- End date as YYYY-MM-DD. If it's before start the dates are swapped and reversed is true. (string, up to 10 characters, required)
- includeEnd
- Count the end date as one more day (by default the start date counts and the end date doesn't, like counting nights). (boolean, default false)
curl https://pithlab.com/api/v1/tools/date-difference-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"start":"2026-01-15","end":"2026-10-20"}'Example response
{
"ok": true,
"result": {
"start": "2026-01-15",
"end": "2026-10-20",
"reversed": false,
"years": 0,
"months": 9,
"days": 5,
"totalMonths": 9,
"totalDays": 278,
"weeks": 39,
"remainderDays": 5,
"businessDays": 198,
"text": "From 2026-01-15 to 2026-10-20: 9 months, 5 days (278 days, 198 business days)"
}
}