{"uid":"cap_sIpLRb43t7C37dlPfnpGT","slug":"work-time-calc-iso-8601-duration-parser-summer-0ed33b06","name":"Work Time Calc – ISO 8601 Duration Parser & Summer","description":"Parse, sum and format ISO 8601 durations (PT36H, P1Y2M10DT2H30M), or turn seconds into ISO and clock form.","url":"https://work-time-calc.x402tookit.com/duration?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"seconds":{"type":"number","description":"Alternative: a number of seconds to format (use instead of durations)"},"carryDays":{"type":"boolean","description":"true carries 24 hours into 1 day in the formatted result (default false)"},"durations":{"type":"string","description":"Comma-separated ISO 8601 durations to parse and sum, e.g. PT36H,PT45M"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"sum":{"type":["null","object"],"properties":{"iso":{"type":["null","string"]},"days":{"type":["null","number"]},"hours":{"type":["null","number"]},"years":{"type":["null","number"]},"months":{"type":["null","number"]},"minutes":{"type":["null","number"]},"seconds":{"type":["null","number"]},"totalSeconds":{}}},"asOf":{"type":["null","string"]},"items":{"type":["array","null"],"items":{"type":"object","properties":{"iso":{"type":["null","string"]},"days":{"type":["null","number"]},"hours":{"type":["null","number"]},"input":{"type":["null","string"]},"years":{"type":["null","number"]},"months":{"type":["null","number"]},"minutes":{"type":["null","number"]},"seconds":{"type":["null","number"]},"totalSeconds":{"type":["null","number"]}}}},"source":{"type":["null","string"]},"sumIso":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"totalHours":{},"totalSeconds":{},"hasCalendarComponents":{"type":["boolean","null"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_e5GfYhjfqHkyf9La8_SCJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parse, sum, and format one or more ISO 8601 durations, or convert a raw seconds value into ISO 8601 and human-readable clock form.","exampleAgentPrompt":"Can you add up these three durations — PT36H, PT45M, and PT2H30M — and tell me the total in ISO 8601 format as well as broken down into hours and minutes?","exampleUseCases":[{"title":"Summing project time logs","prompt":"I have a list of time entries from our project tracker: PT2H30M, PT1H15M, PT45M, and PT3H. Can you add them all up and give me the total as an ISO 8601 duration and also in plain hours and minutes?"},{"title":"Converting seconds to readable duration","prompt":"Our analytics pipeline gave me a session duration of 93780 seconds — can you convert that to ISO 8601 format and also show it broken down into hours and minutes, carrying full days out separately?"},{"title":"Parsing a complex ISO duration string","prompt":"What does the duration P1Y2M10DT2H30M actually mean in plain terms? Break it down into years, months, days, hours, and minutes for me, and tell me the total in seconds too."}],"resultDescription":"Returns a JSON object with a 'sum' field containing the aggregated duration in ISO 8601 format plus numeric components (years, months, days, hours, minutes, seconds, totalSeconds), an 'items' array with per-input breakdowns, and a human-readable summary string. When using the 'seconds' input mode, returns the equivalent ISO 8601 string and clock-form decomposition.","failureModes":["Invalid ISO 8601 duration string returns a reasons array with parse error details","Mixing 'durations' and 'seconds' parameters may yield unexpected results — use one mode at a time","Very large duration values may produce null for certain fields if overflow occurs","Missing required 'input' wrapper object returns a 400-level error","Non-numeric seconds value causes schema validation failure"],"whenToPreferThis":"Choose this endpoint when you need to programmatically parse, sum, or convert ISO 8601 duration strings or raw second counts — especially in payroll, project management, or scheduling contexts where standard duration arithmetic is needed without a full calendar engine. Prefer it over date-diff endpoints when you already have durations and just need to aggregate or reformat them.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:19:59.669Z","isFirstParty":false,"canonicalSlug":"work-time-calc-iso-8601-duration-parser-summer-0ed33b06"}