Time/Timezone Utilities

Business Days

Calculate business days between two dates, automatically excluding weekends. Use via MCP in Cursor or Windsurf, or call GET /v1/time/business-days with start and end date parameters. Returns precise count like "14 business days" between 2024-01-01 and 2024-01-19. Essential for project scheduling and deadline calculations in AI-powered workflows.

API Endpoint

GET /v1/time/business-days

Code Examples

curl "https://tinyfn.io/v1/time/business-days" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/time/business-days', {
  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/business-days',
    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 time/timezone tools:

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

Learn more about MCP setup →

FAQ

How do I count business days between two dates?

Pass start_date and end_date parameters in YYYY-MM-DD format to GET /v1/time/business-days. Returns exact count excluding Saturdays and Sundays.

Does business days calculation include holidays?

No, this tool only excludes weekends (Saturday/Sunday). It doesn't account for national or regional holidays.

Can I use business days calculator in MCP-enabled editors?

Yes, available in Cursor, Claude Code, Windsurf, Cline, and other MCP-compatible tools for automated scheduling calculations.

What date formats work for business days counting?

Use ISO 8601 format (YYYY-MM-DD). Other formats may cause errors or unexpected results.

Does the business days count include the start and end dates?

The calculation follows standard business practice - typically excludes the start date but includes the end date if it's a weekday.

Try Business Days Now

Get your free API key and start using Business Days in seconds.

Get Free API Key