Hours Calculator: API and MCP
Hours 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.hours/mcp/time
- Id
time.hours- Version
- 1.0.0
- Access
- Free
- Tool page
- Hours Calculator
- Schema
GET /api/v1/tools/time.hours
Input
| Field | Type | Constraints | Default | Description |
|---|---|---|---|---|
mode | string | between | add | between | What to calculate |
start | string | Start time · On the clock chosen above: 24-hour or 12-hour. | ||
end | string | End time · An end before the start is on the next day. Midnight: 24:00 or 12:00 AM. | ||
operation | string | add | subtract | add | Operation |
hours | integer | ≥ 0, ≤ 10,000 | 0 | Hours (hours) |
minutes | integer | ≥ 0, ≤ 100,000 | 0 | Minutes (min) |
clock | string | 12 | 24 | 24 | Clock |
Output
| Field | Type | Description |
|---|---|---|
duration | string | Time |
time | string | Time reached |
dayOffset | number | Day offset (days) |
decimalHours | number | Decimal hours (hours) |
totalMinutes | number | Total minutes (min) |
Example request
curl -X POST https://hesaplayici.com/api/v1/tools/time.hours/execute \
-H 'Content-Type: application/json' \
-d '{"input":{"mode":"between","start":"09:00","end":"17:30","operation":"add","hours":0,"minutes":0,"clock":"24"},"locale":"en"}'Example answer
{
"output": {
"duration": "8:30",
"decimalHours": 8.5,
"totalMinutes": 510
},
"steps": [
{
"id": "totalMinutes",
"formula": "time = end − start (+ 24:00 if the end is earlier)",
"substitution": "17:30 − 09:00",
"value": 510,
"unit": "min"
},
{
"id": "decimalHours",
"formula": "decimal hours = minutes / 60",
"substitution": "510 / 60",
"value": 8.5,
"unit": "hours"
}
],
"notes": [],
"meta": {
"toolVersion": "1.0.0",
"locale": "en"
},
"citation": {
"url": "https://hesaplayici.com/en/time/hours-calculator",
"title": "Hours Calculator"
}
}