Date/Time Utilities

Is Weekend

Determines if a given date falls on Saturday or Sunday. Available via MCP in Cursor and other AI coding tools, or REST API at `/v1/datetime/is-weekend`. Pass any date format and get a boolean result — useful for business logic, scheduling algorithms, or filtering datasets by weekdays vs weekends.

API Endpoint

GET /v1/datetime/is-weekend

Code Examples

curl "https://tinyfn.io/v1/datetime/is-weekend" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/datetime/is-weekend', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/datetime/is-weekend',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's date/time tools:

{
  "mcpServers": {
    "tinyfn-datetime": {
      "url": "https://tinyfn.io/mcp/datetime",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What date formats does the is-weekend endpoint accept?

Accepts ISO 8601 dates (2024-03-15), timestamps, and most common date strings. Returns true for Saturday/Sunday, false otherwise.

How do I check weekend dates in my MCP-enabled AI coding assistant?

Call the is-weekend tool with your date parameter. Works in Cursor, Claude Code, Windsurf, and other MCP clients for instant weekend validation.

Does is-weekend consider timezone or just the calendar date?

Evaluates the calendar date only, not timezone-specific weekend timing. Saturday and Sunday always return true regardless of time zone.

Can I batch check multiple dates for weekend status?

No, the endpoint processes one date per request. For batch operations, make multiple API calls or use it iteratively in your AI agent workflow.

What's the return format for weekend detection results?

Returns a JSON boolean: `{"is_weekend": true}` for Saturday/Sunday, `{"is_weekend": false}` for Monday-Friday.

Try Is Weekend Now

Get your free API key and start using Is Weekend in seconds.

Get Free API Key