hesaplayıcı
Menu

Date Difference Calculator: API and MCP

Date Difference Calculator over REST and MCP: input fields, limits, outputs, one example request and its real answer. Free, no sign-up.

GET /api/v1/tools/time.date-difference/mcp/time

Id
time.date-difference
Version
1.0.0
Access
Free
Tool page
Date Difference Calculator
Schema
GET /api/v1/tools/time.date-difference

Input

FieldTypeConstraintsDefaultDescription
start (required)stringStart date
end (required)stringEnd date
includeEndstringno | yesnoCount the end day?

Output

FieldTypeDescription
daysnumberDays (days)
weeksnumberFull weeks (weeks)
weekDaysnumberDays after the full weeks (days)
yearsnumberYears (years)
monthsnumberMonths (months)
monthDaysnumberDays after the full months (days)
businessDaysnumberBusiness days (Monday–Friday) (days)

Example request

{
  "input": {
    "start": "2026-01-01",
    "end": "2026-12-31",
    "includeEnd": "yes"
  },
  "locale": "en"
}
Example answer
{
  "output": {
    "days": 365,
    "weeks": 52,
    "weekDays": 1,
    "years": 1,
    "months": 0,
    "monthDays": 0,
    "businessDays": 261
  },
  "steps": [
    {
      "id": "days",
      "formula": "days = end − start + 1",
      "substitution": "days = 2026-12-31 − 2026-01-01 + 1",
      "value": 365,
      "unit": "days"
    },
    {
      "id": "weeks",
      "formula": "full weeks = ⌊days / 7⌋",
      "substitution": "full weeks = ⌊365 / 7⌋",
      "value": 52,
      "unit": "weeks"
    },
    {
      "id": "weekDays",
      "formula": "remaining days = days − 7 × full weeks",
      "substitution": "remaining days = 365 − 7 × 52",
      "value": 1,
      "unit": "days"
    },
    {
      "id": "businessDays",
      "formula": "business days = days − Saturdays and Sundays",
      "substitution": "business days = 365 − 104",
      "value": 261,
      "unit": "days"
    }
  ],
  "meta": {
    "toolVersion": "1.0.0",
    "locale": "en"
  },
  "citation": {
    "url": "https://hesaplayici.com/en/time/date-difference-calculator",
    "title": "Date Difference Calculator"
  }
}