# Taiwan Workday & Public Holiday Calendar (台灣上班日／國定假日) (`zriil/taiwan-workday-calendar`) Actor

Is it a working day in Taiwan? Check dates, list public holidays and make-up workdays (補班), add N business days or count business days between two dates, from the official government office calendar 2017-2027. Runs offline: no data leaves the run.

- **URL**: https://apify.com/zriil/taiwan-workday-calendar.md
- **Developed by:** [zriil](https://apify.com/zriil) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Taiwan Workday & Public Holiday Calendar (台灣上班日／國定假日)

Find out whether a date is a working day in Taiwan, list every public holiday and make-up workday (補班) in a year, add N business days to a date, or count business days between two dates.

Based on the **official government office calendar** (中華民國政府行政機關辦公日曆表) published by the Directorate-General of Personnel Administration, Executive Yuan. Covers **2017-2027**, including make-up workdays (補班) and make-up days off (補假) that generic holiday libraries often get wrong.

#### What it costs

**$0.0005 per result** (one checked date, one listed holiday, or one calculation). Invalid dates and dates outside the covered years are skipped and **not charged**.

#### Modes

| Mode | Input | Returns |
|---|---|---|
| `checkDates` | `dates` (many formats, incl. Minguo dates like `115/10/10`) | `isWorkday`, `type` and holiday `name` for each date |
| `listDaysOff` | `year` | holidays, make-up days off and make-up workdays of that year |
| `addWorkdays` | `startDate`, `workdays` (can be negative) | the resulting date |
| `countWorkdays` | `startDate`, `endDate` | business days, days off and named holidays in the range |

`type` is one of `workday`, `make-up-workday` (補班, a weekend day you work), `weekend`, `public-holiday`, `make-up-day-off` (補假), `day-off`.

#### Example output (checkDates)

```json
{ "input": "2026/10/10", "date": "2026-10-10", "weekday": "Sat", "isWorkday": false, "type": "public-holiday", "name": "國慶日" }
```

#### Good to know

- Follows the calendar for **government offices**. Most private employers follow it, but yours may differ.
- **Typhoon days** and other ad-hoc closures are announced on the day and are **not** included.
- Runs fully offline: your dates never leave the run and nothing is stored.
- Data source: 行政院人事行政總處「中華民國政府行政機關辦公日曆表」, data.gov.tw dataset 14718, Open Government Data License, version 1.0 (政府資料開放授權條款－第1版). Updated when each new year's calendar is published.

# Actor input Schema

## `mode` (type: `string`):

checkDates: is each date a workday or a day off? listDaysOff: public holidays, make-up days off and make-up workdays in a year. addWorkdays: the date N business days after (or before) a start date. countWorkdays: business days between two dates.

## `dates` (type: `array`):

One date per line. Accepts 2026-10-10, 2026/10/10, 20261010 and Minguo (ROC) dates like 115/10/10. Up to 100,000 per run.

## `year` (type: `integer`):

Western calendar year, 2017-2027.

## `onlyHolidays` (type: `boolean`):

Skip ordinary Saturdays and Sundays; return only named holidays, make-up days off (補假) and make-up workdays (補班).

## `startDate` (type: `string`):

e.g. 2026-12-24

## `endDate` (type: `string`):

Inclusive, e.g. 2027-01-31

## `workdays` (type: `integer`):

Positive to go forward, negative to go back (max 2000).

## Actor input object example

```json
{
  "mode": "checkDates",
  "dates": [
    "2026-10-09",
    "2026-10-10",
    "2027-02-05"
  ],
  "onlyHolidays": true,
  "workdays": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "dates": [
        "2026-10-09",
        "2026-10-10",
        "2027-02-05"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zriil/taiwan-workday-calendar").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "dates": [
        "2026-10-09",
        "2026-10-10",
        "2027-02-05",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("zriil/taiwan-workday-calendar").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "dates": [
    "2026-10-09",
    "2026-10-10",
    "2027-02-05"
  ]
}' |
apify call zriil/taiwan-workday-calendar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zriil/taiwan-workday-calendar"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vXlBJO2Hlmx01c2z6/builds/lKu2f6xD6qbZXzxle/openapi.json
