Validates date strings and returns structured results including validity status, parsed components, and error details. Access via MCP in Cursor/Claude Code or GET /v1/validate/date. Returns true/false validity plus extracted year, month, day when valid. Handles multiple formats including ISO 8601, US format, and European format automatically.
curl "https://tinyfn.io/v1/validate/date" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/validate/date', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/validate/date',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's validation tools:
{
"mcpServers": {
"tinyfn-validation": {
"url": "https://tinyfn.io/mcp/validation",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Supports ISO 8601 (2024-03-15), US format (03/15/2024), European format (15/03/2024), and common variations with different separators like dashes, slashes, and dots.
AI agents in Cursor or Windsurf can validate user-provided dates before processing them in databases, APIs, or calculations, preventing downstream errors from malformed date strings.
Yes, it validates actual calendar dates including leap year February 29th and prevents invalid dates like February 30th or June 31st.
Returns validity: false with specific error messages like 'Invalid month value' or 'Day out of range for month', plus null values for parsed components.
This tool validates complete date strings only. For partial dates or ranges, you'd need to parse them first or use separate validation logic.
Get your free API key and start using Validate Date in seconds.
Get Free API Key