How to Build Holiday-Aware Calendars with Copilot

Build holiday-aware calendars in your IDE with Copilot and ToolRouter. Working-day data for developers.

Tool
Public Holidays icon
Public Holidays

Copilot generates holiday-aware calendar data and the code to use it. Fetch holidays for target countries, create working-day lookup modules, and build business day calculators for your SLA, billing, or scheduling systems -- producing both data and application logic from your development environment.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Public Holidays tool:

  1. In Copilot Chat: "Get US public holidays for 2026"
  2. Copilot returns the holiday data
  3. Ask: "Generate a TypeScript module that exports working days per month for 2026"
  4. Integrate the generated code into your application

Example Prompt

Try this with Copilot using the Public Holidays tool
Fetch US holidays for 2026 and create a JSON config file mapping each month to its working day count. I need this for our SLA calculator.

Tips

  • Generate working-day lookup functions for your application directly from the data
  • Create holiday-aware date utilities for your codebase
  • Automate annual calendar data updates as part of your build process