Date Parser
Turn ambiguous dates such as '3/4/25', 'March 4th', '4. mars 2025' or '2025-W14' into ISO 8601, and flag the ambiguous ones.
Pay by wallet (x402)
date-parse Example
Example answer
{
"error": "Could not parse date string.",
"input": "test",
"parsed": false
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
date_string | string | Yes | Date string to parse |
preferred_format | string | No | DMY, MDY, or YMD (for ambiguous dates) |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
day | integer | Always (present in every successful answer) |
year | integer | Always (present in every successful answer) |
month | integer | Always (present in every successful answer) |
iso_date | string | Always (present in every successful answer) |
day_of_week | string | Always (present in every successful answer) |
is_ambiguous | boolean | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "date-parse",
"inputs": {
"date_string": "2025-03-04"
},
"max_price_cents": 3
}' {
"tool": "strale_execute",
"arguments": {
"slug": "date-parse",
"inputs": {
"date_string": "2025-03-04"
},
"max_price_cents": 3
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "date-parse",
inputs: {
"date_string": "2025-03-04"
},
max_price_cents: 3,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="date-parse",
inputs={
"date_string": "2025-03-04",
},
max_price_cents=3,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/date-parse?date_string=2025-03-04' Limitations
Ambiguous dates need a format or locale hint
Ambiguous date formats (e.g., 01/02/03) are resolved using locale hints — may misinterpret month/day order without explicit format
What to do instead: Pass the expected date format or locale in the input to eliminate ambiguity for MM/DD vs DD/MM formats
Related tools
- Address Parser €0.05
- Company Industry Classification €0.05
- Company Name Match €0.02
- Credit Score Band €0.02
- CSV Cleaner €0.02
- CSV to JSON €0.02