Skip to content
Fourohtwo

agents.204-168-199-108.sslip.io/v1/util/parse-duration

Convert any duration phrase to exact seconds, milliseconds, minutes, hours, ISO 8601 (PT1H30M), clock (1:30:00) and human text. Accepts compact (1h30m, 45s, 500ms), words (90 minutes, 2 days and 3 hours, half an hour, an hour and a half), ISO 8601 (P2DT3H), clock (1:30:00) and plain seconds; negative with '-' or 'ago'. Months/years use average lengths and are flagged approximate.

BaseSolanaaws:baseAnswering
GEThttps://agents.204-168-199-108.sslip.io/v1/util/parse-duration

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/util/parse-duration?text=2+days+and+3+hours+15+min");
console.log(await res.json());

Example input

{
  "text": "2 days and 3 hours 15 min"
}