API & MCP

Everything a person can do on Timeslice Duration & Time Range Parser, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Timeslice Duration & Time Range Parser

Reads durations and time ranges the way people type them — 1h30, 1 hour 30 minutes, 90m, 1:30, 1,5 h, PT1H30M, 9-10:30, 9am to 1pm, 22:00-02:00, 14:00 + 45m — one per line, and returns each as h:mm, decimal hours and an ISO 8601 duration, with the total and how every line was read.

Inputs of Timeslice Duration & Time Range Parser
FieldTypeDefaultDescription
linestextarea"1h30\n90m\n2:15\n1,5 h\n9-10:30\n9am to 1pm\n22:00-02:00\n14:00 + 45m"Durations or time ranges (one per line). Durations: 1h30, 1h 30m, 90m, 1:30, 1.5 (a bare number up to 10 is hours, larger whole numbers are minutes), PT1H30M. Ranges: 9-10:30, 9:00–17:30, 9am to 1pm, 14:00 + 45m.
clockselect (24, 12)"24"Show times as
roundMinutesselect (0, 5, 6, 15, 30)"0"Round each line to

Example request

Mixed ways of writing time

curl -X POST https://timeslicedurationparser.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"lines":"1h30\n90m\n2:15\n1,5 h\n9-10:30\n9am to 1pm\n22:00-02:00\n14:00 + 45m"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "timeslice-duration-parser": { "type": "http", "url": "https://timeslicedurationparser.usefulweb.app/mcp" }
  }
}