Calculates the exact end timestamp for any time period — day, week, month, quarter, or year. Access via MCP in Cursor and other AI editors, or REST API at `/v1/time/end-of`. Pass a date and period type, get back the precise end moment (like 2024-03-31T23:59:59.999Z for March). Essential for date range queries and period-based calculations.
curl "https://tinyfn.io/v1/time/end-of" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/time/end-of', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/time/end-of',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's time/timezone tools:
{
"mcpServers": {
"tinyfn-time": {
"url": "https://tinyfn.io/mcp/time",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Send a GET request to `/v1/time/end-of` with the current date and period='month'. Returns the last millisecond of the month as an ISO timestamp.
Supports day, week, month, quarter, and year periods. Each returns the precise end timestamp down to milliseconds for accurate date range operations.
Yes, Claude Code and other MCP-enabled editors can call this tool with period='quarter' to get exact quarter-end dates for financial reporting and analysis.
The tool works with the input timezone context. Specify timezone in your date parameter or it defaults to UTC for consistent period boundary calculations.
End-of-day returns 23:59:59.999 of the same date, while end-of-week finds the last millisecond of Sunday (or your locale's week-end day).
Get your free API key and start using End Of Period in seconds.
Get Free API Key