1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "label": "Invoice due in 10 working days",
14 "mode": "add-working-days",
15 "date": "2026-12-18",
16 "days": 10
17 },
18 {
19 "label": "Is Boxing Day substitute a working day?",
20 "mode": "is-working-day",
21 "date": "2026-12-28"
22 },
23 {
24 "label": "Working days in April 2026",
25 "mode": "working-days-between",
26 "date": "2026-03-31",
27 "to": "2026-04-30"
28 },
29 {
30 "label": "Scotland: next working day after Hogmanay",
31 "mode": "next-working-day",
32 "date": "2026-12-31",
33 "nation": "scotland"
34 },
35 {
36 "label": "Serve application notice (3 clear days)",
37 "mode": "cpr-days-before",
38 "date": "2026-04-08",
39 "days": 3
40 },
41 {
42 "label": "Defence due (14 days, court office)",
43 "mode": "cpr-within-days",
44 "date": "2026-12-12",
45 "days": 14,
46 "courtOffice": true
47 }
48 ]
49};
50
51
52const run = await client.actor("landlordtools/uk-working-days").call(input);
53
54
55console.log('Results from dataset');
56console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62