77trust / 100

Parse

by Parse an ISO 8601 duration in Documents & files

x402 APIPassing, checked 2 h ago

Parse an ISO 8601 duration such as 'P1Y2M10DT2H30M' into its components. Returns a normalized ISO string and totalSeconds — but totalSeconds is null when the duration contains years or months, because those are calendar-variable (use /v1/add or /v1/between for exact date math).

POST https://datetime.openverbs.com/v1/parse

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
554 ms typical, 595 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://datetime.openverbs.com/v1/parse' \
  -H 'content-type: application/json' \
  --data-raw '{"duration":"P1Y2M10DT2H30M"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdatetime.openverbs.com%2Fv1%2Fparse
const res = await pay("https://datetime.openverbs.com/v1/parse", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"duration\":\"P1Y2M10DT2H30M\"}",
});
console.log(await res.json());

Example input

{
  "duration": "P1Y2M10DT2H30M"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402577 ms$0.002
6 h agoPassed402554 ms$0.002
10 h agoPassed402164 ms$0.002
14 h agoPassed402594 ms$0.002
18 h agoPassed402609 ms$0.002
22 h agoPassed402519 ms$0.002
25 h agoPassed402595 ms$0.002
29 h agoPassed402170 ms$0.002
32 h agoPassed402568 ms$0.002
36 h agoPassed402166 ms$0.002
39 h agoPassed402498 ms$0.002
43 h agoPassed402548 ms$0.002
47 h agoPassed402500 ms$0.002
2 days agoPassed402580 ms$0.002
2 days agoPassed402561 ms$0.002