# Japan Business Day & Holiday Calculator (営業日・祝日・和暦) (`fontom.ai.plus/japan-business-calendar`) Actor

Business days, Japanese national holidays (Cabinet Office official list), wareki ⇄ Gregorian and fiscal year. Deterministic, no scraping.

- **URL**: https://apify.com/fontom.ai.plus/japan-business-calendar.md
- **Developed by:** [FONTOM AI](https://apify.com/fontom.ai.plus) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-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

## Japan Business Day & Holiday Calculator (営業日・祝日・和暦)

Answers the date questions every Japan-facing workflow keeps getting wrong: **is this a business day, what is the 5th business day after X, how many business days are in this period, what is this date in 和暦, which fiscal year/quarter is it.**

- **Official data.** Holidays come from the Cabinet Office's national holiday list (内閣府「国民の祝日」, 1955–), fetched on every run, so a new year appears without any update from me. For years the official list does not cover yet, holidays are computed from the statute (verified identical to the official list for every year 2000–2027).
- **Deterministic.** Same input, same output. No scraping, no AI guessing, no API keys.
- **Bulk friendly.** Hundreds of questions in one run; one result row per task.
- **AI-agent friendly.** Works through the Apify MCP server, so Claude/Cursor agents can call it instead of guessing Japanese holidays.

### Input

`tasks` is an array of objects:

| `type` | fields | result |
|---|---|---|
| `isBusinessDay` | `date` | open/closed and the reason (土曜日 / 祝日: 文化の日 / 年末年始 / 指定休業日) |
| `addBusinessDays` | `date`, `days` (negative = backwards, `0` = next open day) | the resulting date with full day info |
| `businessDaysBetween` | `from`, `to` | business days in \[from, to) |
| `holidays` | `year` (1955–2099) | all national holidays of the year, `source: official | computed` |
| `info` | `date` | weekday, holiday, 和暦, fiscal year/quarter, open/closed |
| `toWareki` / `fromWareki` | `date` / `text` | 令和8年10月14日 ⇄ 2026-10-14 |

Dates: `2026-10-14`, `2026/10/14`, `20261014`, `令和8年10月14日`, `R8.10.14`, `令和元年5月1日`.

Options: `closeYearEnd` (12/29–1/3 closed, default on), `weekendDays` (default Sat+Sun), `extraHolidays` (company closures), `fiscalYearStartMonth` (default April).

```json
{ "tasks": [
  { "type": "addBusinessDays", "date": "2026-10-30", "days": 3 },
  { "type": "toWareki", "date": "2026-10-14" }
] }
```

### Output (example)

```json
{ "ok": true, "from": "2026-10-30", "days": 3,
  "result": { "date": "2026-11-05", "weekday": "木", "isBusinessDay": true, "wareki": "令和8年11月5日", "fiscalYear": 2026, "fiscalQuarter": 3 } }
```

### Pricing

Pay per event: one `result` event per successful task. Invalid tasks return an `ok: false` row and are free.

### Limits, stated plainly

- Dates before 1873-01-01 (lunar-calendar period) are not converted to 和暦 on purpose.
- Business days follow national holidays, weekends and the optional year-end closure. Bank holidays, company calendars, and regional holidays are not known; use `extraHolidays`.
- Computed holidays (years after the official list) follow current law; a future law change will only be reflected once the Cabinet Office publishes it.

Source: 内閣府「国民の祝日について」(https://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html), government standard terms of use. This tool is not legal or financial advice.

# Actor input Schema

## `tasks` (type: `array`):

Array of task objects. type = info | isBusinessDay | addBusinessDays | businessDaysBetween | holidays | toWareki | fromWareki. Dates accept 2026-10-14, 2026/10/14, 20261014, 令和8年10月14日, R8.10.14.

## `closeYearEnd` (type: `boolean`):

Many Japanese companies and banks are closed 12/29–1/3 (the national holiday list does not include these days).

## `weekendDays` (type: `array`):

Days of the week that are not business days. \[0,6] = Sat+Sun; \[0] = open on Saturdays.

## `extraHolidays` (type: `array`):

Company-specific closures (e.g. Obon). Same date formats as above.

## `fiscalYearStartMonth` (type: `integer`):

4 = April (the Japanese default).

## Actor input object example

```json
{
  "tasks": [
    {
      "type": "addBusinessDays",
      "date": "2026-10-30",
      "days": 3
    },
    {
      "type": "isBusinessDay",
      "date": "2026-11-03"
    },
    {
      "type": "businessDaysBetween",
      "from": "2026-10-01",
      "to": "2026-11-01"
    },
    {
      "type": "holidays",
      "year": 2027
    },
    {
      "type": "toWareki",
      "date": "2026-10-14"
    },
    {
      "type": "fromWareki",
      "text": "令和元年5月1日"
    },
    {
      "type": "info",
      "date": "2026-12-31"
    }
  ],
  "closeYearEnd": true,
  "weekendDays": [
    0,
    6
  ],
  "fiscalYearStartMonth": 4
}
```

# Actor output Schema

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

Result rows in the default dataset.

# 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 = {
    "tasks": [
        {
            "type": "addBusinessDays",
            "date": "2026-10-30",
            "days": 3
        },
        {
            "type": "isBusinessDay",
            "date": "2026-11-03"
        },
        {
            "type": "businessDaysBetween",
            "from": "2026-10-01",
            "to": "2026-11-01"
        },
        {
            "type": "holidays",
            "year": 2027
        },
        {
            "type": "toWareki",
            "date": "2026-10-14"
        },
        {
            "type": "fromWareki",
            "text": "令和元年5月1日"
        },
        {
            "type": "info",
            "date": "2026-12-31"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fontom.ai.plus/japan-business-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 = { "tasks": [
        {
            "type": "addBusinessDays",
            "date": "2026-10-30",
            "days": 3,
        },
        {
            "type": "isBusinessDay",
            "date": "2026-11-03",
        },
        {
            "type": "businessDaysBetween",
            "from": "2026-10-01",
            "to": "2026-11-01",
        },
        {
            "type": "holidays",
            "year": 2027,
        },
        {
            "type": "toWareki",
            "date": "2026-10-14",
        },
        {
            "type": "fromWareki",
            "text": "令和元年5月1日",
        },
        {
            "type": "info",
            "date": "2026-12-31",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fontom.ai.plus/japan-business-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 '{
  "tasks": [
    {
      "type": "addBusinessDays",
      "date": "2026-10-30",
      "days": 3
    },
    {
      "type": "isBusinessDay",
      "date": "2026-11-03"
    },
    {
      "type": "businessDaysBetween",
      "from": "2026-10-01",
      "to": "2026-11-01"
    },
    {
      "type": "holidays",
      "year": 2027
    },
    {
      "type": "toWareki",
      "date": "2026-10-14"
    },
    {
      "type": "fromWareki",
      "text": "令和元年5月1日"
    },
    {
      "type": "info",
      "date": "2026-12-31"
    }
  ]
}' |
apify call fontom.ai.plus/japan-business-calendar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fontom.ai.plus/japan-business-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/GHmzHUOCCjmNTPglS/builds/BTeOTn1cDUR3dWcMm/openapi.json
