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

FieldTypeRequiredWhat it is
date_stringstringYesDate string to parse
preferred_formatstringNoDMY, MDY, or YMD (for ambiguous dates)

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
dayintegerAlways (present in every successful answer)
yearintegerAlways (present in every successful answer)
monthintegerAlways (present in every successful answer)
iso_datestringAlways (present in every successful answer)
day_of_weekstringAlways (present in every successful answer)
is_ambiguousbooleanAlways (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
  }'

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