# UK Tax Year and Week Helper (`landlordtools/uk-tax-year-week-helper`) Actor

Batch date-only UK tax year, tax week and tax month labels and inclusive boundaries.

- **URL**: https://apify.com/landlordtools/uk-tax-year-week-helper.md
- **Developed by:** [LandlordTools](https://apify.com/landlordtools) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 date 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

## UK Tax Year and Week Helper

Batch date-only UK tax year, tax week and tax month labels and inclusive boundaries.

### Inputs and calculation

Supply `date` as YYYY-MM-DD, from 2020-04-06 through 2027-04-05. Only calendar classification is provided; do not submit employee or taxpayer information.

The UK tax year runs from 6 April through 5 April.[2](https://www.gov.uk/sa302-tax-calculation) Tax weeks start with 6–12 April; the remaining one or two days after 52 complete weeks form week 53. Tax months run from the sixth through the fifth of the next month.[1](https://www.gov.uk/government/publications/cwg2-further-guide-to-paye-and-national-insurance-contributions/2026-to-2027-employer-further-guide-to-paye-and-national-insurance-contributions)

Each row returns `taxYear` as YYYY/YY, `yearStart`, `yearEnd`, `taxWeek`, `weekStart`, `weekEnd`, `taxMonth`, `monthStart`, `monthEnd`, and one-based `dayOfTaxYear`. All endpoints are inclusive. The week is a tax-calendar label, not an ISO week and not proof that a payroll requires an extra payment or allowance.

This uses the cited calendar definitions throughout the supported range. No Income Tax, National Insurance, statutory pay, payment schedule, filing deadline or payroll deduction is calculated. Dates outside the fixed range are rejected; extending the supported range requires a reviewed release. Not legal or tax advice.

### Example

```json
{
  "items": [
    {
      "date": "2026-04-05"
    }
  ]
}
```

The dataset and local CLI return these rows:

```json
[
  {
    "rowIndex": 0,
    "date": "2026-04-05",
    "taxYear": "2025/26",
    "yearStart": "2025-04-06",
    "yearEnd": "2026-04-05",
    "taxWeek": 53,
    "weekStart": "2026-04-05",
    "weekEnd": "2026-04-05",
    "taxMonth": 12,
    "monthStart": "2026-03-06",
    "monthEnd": "2026-04-05",
    "dayOfTaxYear": 365
  }
]
```

### Batch and output behaviour

Supply 1–10,000 items. Unknown fields are rejected. Validation finishes for the whole batch before storage or billing. One invalid row fails the run with its zero-based index; input values are not included in the error. Duplicate rows are preserved and each stored row counts as a result. `rowIndex` preserves input order.

The Apify dataset holds results. The key-value store record `OUTPUT` contains `requestedCount`, `storedCount`, `truncated` and `results`. A configured charge limit may shorten the dataset; OUTPUT includes only those saved rows. Start a fresh run after an interruption: a non-empty dataset is rejected to prevent duplicate billing. Storage and billing are not a single transaction; infrastructure failures can leave partial storage or a charge requiring platform review.

### Local use and tests

```text
node cli.js examples/input.json
node tests/run.js
```

These commands need only Node and use no network or SDK installation. The deployment target is Node 22. `main.js` uses the Apify SDK for platform storage and billing. The container installs the declared dependency during a future build.

### Pricing suggestion

Suggested pay-per-event price: **$1 per 1,000 stored results** ($0.001 per `result-item` event). No custom start fee. This is a proposed configuration, not active pricing. The manager must configure the exact event name and price in Apify before any release. The SDK call uses `Actor.pushData(results, "result-item")`; do not also add a separate charge for those rows. [Apify billing documentation](https://docs.apify.com/sdk/js/docs/concepts/pay-per-event) (accessed 2026-10-03).

### Sources and data licences

Contains public sector information licensed under the Open Government Licence v3.0. GOV.UK makes its content available under OGL except where stated otherwise; see the numbered GOV.UK terms source below. Licence: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/. No external data is fetched at runtime.

1. [HMRC employer guide 2026 to 2027: tax weeks and months](https://www.gov.uk/government/publications/cwg2-further-guide-to-paye-and-national-insurance-contributions/2026-to-2027-employer-further-guide-to-paye-and-national-insurance-contributions) — accessed 2026-10-03. Open Government Licence v3.0.
2. [GOV.UK tax year definition](https://www.gov.uk/sa302-tax-calculation) — accessed 2026-10-03. Open Government Licence v3.0.
3. [GOV.UK terms and conditions](https://www.gov.uk/help/terms-conditions) — accessed 2026-10-03. Open Government Licence v3.0.

AI-generated software draft for LandlordTools; manager review required before release.

# Actor input Schema

## `items` (type: `array`):

See README for field semantics and limits.

## Actor input object example

```json
{
  "items": [
    {
      "date": "2026-04-05"
    }
  ]
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `output` (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 = {
    "items": [
        {
            "date": "2026-04-05"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("landlordtools/uk-tax-year-week-helper").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 = { "items": [{ "date": "2026-04-05" }] }

# Run the Actor and wait for it to finish
run = client.actor("landlordtools/uk-tax-year-week-helper").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 '{
  "items": [
    {
      "date": "2026-04-05"
    }
  ]
}' |
apify call landlordtools/uk-tax-year-week-helper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,landlordtools/uk-tax-year-week-helper"
        }
    }
}
```

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/C5N3Lr3FDzWHS6VO7/builds/CfYtM4jRghAbVgC2T/openapi.json
