1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "tasks": [
12 {
13 "type": "addBusinessDays",
14 "date": "2026-10-30",
15 "days": 3
16 },
17 {
18 "type": "isBusinessDay",
19 "date": "2026-11-03"
20 },
21 {
22 "type": "businessDaysBetween",
23 "from": "2026-10-01",
24 "to": "2026-11-01"
25 },
26 {
27 "type": "holidays",
28 "year": 2027
29 },
30 {
31 "type": "toWareki",
32 "date": "2026-10-14"
33 },
34 {
35 "type": "fromWareki",
36 "text": "令和元年5月1日"
37 },
38 {
39 "type": "info",
40 "date": "2026-12-31"
41 }
42 ]
43};
44
45
46const run = await client.actor("fontom.ai.plus/japan-business-calendar").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56