dates.age
Age in whole years on a given date, with 29 February birthdays ageing on 1 March in other years.
age in Python
1.0.0
py rs ts
18 tests
dates.recurrence
The next n dates of a repeating rule: monthly on a day, last weekday of the month, every k days or weeks, yearly.
recurrence in Python
1.0.0
py rs ts
25 tests
dates.overlap
Days two date ranges have in common, with the end of each range stated as inclusive or exclusive.
overlap_days in Python
1.0.0
py rs ts
15 tests
construction.payment-notice-dates
Construction Act default dates: payment due, payment notice, final date for payment and pay-less notice.
payment_notice_dates in Python
1.0.2
py rs ts
21 tests
dates.add-days
Shift an ISO date by a whole number of days, forwards or backwards, with exact calendar arithmetic.
add_days in Python
1.0.0
py rs ts
28 tests
dates.days-between
Calendar days from one ISO date to another, signed: negative when the second date is earlier.
days_between in Python
1.0.0
py rs ts
15 tests
dates.add-months
Add calendar months to an ISO date, clamping to the month end: 31 Jan + 1 month is 28 or 29 Feb.
add_months in Python
1.0.0
py rs ts
22 tests
dates.add-business-days
Move a date forward or back by working days, skipping weekends and a caller-supplied holiday list.
add_business_days in Python
1.0.0
py rs ts
19 tests
dates.business-days-between
Working days between two dates, excluding weekends and a caller-supplied holiday list.
business_days_between in Python
1.0.0
py rs ts
26 tests
dates.month-boundaries
The first day, last day and length of the calendar month containing a date.
month_boundaries in Python
1.0.0
py rs ts
19 tests
dates.day-count-fraction
Year fraction between two dates by ACT/365F, ACT/360, 30/360, 30E/360 or ACT/ACT ISDA, as an exact fraction.
day_count_fraction in Python
1.0.0
py rs ts
21 tests
dates.uk-tax-year
The UK personal tax year containing a date: 6 April to 5 April, with HMRC's label.
uk_tax_year in Python
1.0.0
py rs ts
19 tests
dates.day-of-week
The ISO 8601 day of the week for a date: 1 is Monday through 7 is Sunday.
day_of_week in Python
1.0.0
py rs ts
20 tests
dates.quarter
Calendar quarter and fiscal quarter of a date, with the fiscal year and quarter date ranges, for any start month.
quarter in Python
1.0.0
py rs ts
17 tests
dates.bank-holidays
UK bank and public holidays for a region and year, as published by gov.uk, including one-off holidays.
bank_holidays in Python
1.0.1
py rs ts
15 tests
dates.week-number
ISO 8601 week number and week-numbering year of a date: weeks start Monday, week 1 holds the first Thursday.
week_number in Python
1.0.0
py rs ts
18 tests
banking.bacs-processing-date
Bacs three-day cycle: input, processing and entry (arrival) dates for a submission, skipping weekends and bank holidays.
bacs_processing_dates in Python
1.0.0
py rs ts
18 tests
form.date-parts
Check a date typed into day, month and year boxes, with GOV.UK's error messages and the boxes to mark in error.
validate_date_parts in Python
1.0.1
py rs ts
49 tests
charity.regular-giving-schedule
Collection dates for a regular gift: monthly, quarterly or annual on a day, clamped to short months, after a lead time.
regular_giving_schedule in Python
1.0.0
py rs ts
19 tests
finance.payment-terms-due-date
Invoice due date from payment terms: net N days, end of month, N days after month end, day N of next month.
payment_due_date in Python
1.0.0
py rs ts
26 tests
logistics.delivery-date
Estimated dispatch and delivery dates from order time, dispatch cut-off, service days, weekends and UK bank holidays.
delivery_date in Python
1.0.0
py rs ts
26 tests
1.0.0
py rs ts
21 tests
todo.parse-date-phrase
Read a typed due date like "tomorrow", "next friday", "in 2 weeks" or "2026-10-01" as a date, relative to today.
parse_date_phrase in Python
1.0.0
py rs ts
53 tests
dates.is-leap-year
Whether a year is a Gregorian leap year: every 4th, except centuries, except every 400th.
is_leap_year in Python
1.0.0
py rs ts
15 tests
legal.limitation-date Unreviewed
The last day to bring a claim under the Limitation Act 1980, by claim type, from the date it accrued.
limitation_date in Python
1.0.1
py rs ts
26 tests
health.age-in-months Unreviewed
Age in completed months and days on a given date, for paediatric charts and doses; month ends handled like birthdays.
age_in_months in Python
1.0.1
py rs ts
19 tests
health.gestational-age Unreviewed
Gestational age (weeks+days) and estimated due date from the last menstrual period by Naegele's rule, cycle-adjusted.
gestational_age in Python
1.0.1
py rs ts
20 tests
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
age_band in Python
1.0.1
py rs ts
18 tests
todo.sort
Sort todos by manual order, due date, priority, creation time or title, stably, with sensible tie-breakers.
sort_todos in Python
1.0.0
py rs ts
20 tests
charts.format → formatDate
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
format_date in Python, one function of this group
1.0.0
py rs ts
61 tests
react.form.date-input React ^19 · TypeScript only
Day, month and year boxes under one legend, with hint, error message and the boxes in error marked (GOV.UK date input).
Not available in Python
1.0.1
ts
14 tests
todo.reschedule-recurrence
When a repeating todo's due date is moved by hand, move its series with it: the new date becomes the anchor.
reschedule_recurrence in Python
1.0.0
py rs ts
14 tests
education.school-year-group
School year group from date of birth on a date, by UK nation: Reception to Year 13, P1 to S6, P1 to Year 14.
school_year_group in Python
1.0.1
py rs ts
22 tests
manufacturing.lot-number
Deterministic lot or batch code YYDDD-LL-SSS from the production date (Julian day), line and sequence.
lot_number in Python
1.0.0
py rs ts
16 tests
subscriptions.dunning-schedule
Retry dates for a failed subscription payment from a retry policy, in calendar or business days.
dunning_schedule in Python
1.0.0
py rs ts
14 tests
todo.next-occurrence
The next due date of a repeating todo once it is done: daily, weekdays, weekly, monthly or yearly, month-end safe.
next_occurrence in Python
1.0.0
py rs ts
24 tests
time.minutes-between
Minutes from one local date and time to another, correct across midnight; wall-clock time, no time zones.
minutes_between in Python
1.0.0
py rs ts
15 tests
fleet.service-due
Next vehicle service by months or miles, whichever comes first, projecting the mileage date, with an overdue flag.
service_due in Python
1.0.0
py rs ts
18 tests
education.fee-instalments
Tuition fee instalment schedule from a total, shares and due dates, exact to the penny.
fee_instalments in Python
1.0.0
py rs ts
20 tests
finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
vat_rate in Python
1.2.2
py rs ts
25 tests
todo.due-status
Where a todo stands against its due date today: done, overdue, today, tomorrow, this week, later or no date.
due_status in Python
1.0.0
py rs ts
19 tests
hr.length-of-service
Continuous service between two dates in completed years, months and days, counting both end dates.
length_of_service in Python
1.0.0
py rs ts
11 tests
subscriptions.trial-end
When a free trial ends and the first payment is due, from the trial's start date and length in days.
trial_end in Python
1.0.0
py rs ts
12 tests
insurance.ipt Unreviewed
UK Insurance Premium Tax at the standard or higher rate in force on a date, added to or taken out of a premium.
insurance_premium_tax in Python
1.0.2
py rs ts
23 tests
energy.price-cap
Ofgem energy price cap unit rate and daily standing charge for a fuel and payment method on a date (GB average).
price_cap in Python
1.0.2
py rs ts
19 tests
finance.uk-bank-rate
Bank of England Bank Rate (base rate) in force on a date, from the Bank's official history since 2001.
uk_bank_rate in Python
1.0.1
py rs ts
14 tests
todo.group-by-due
Split todos into Overdue, Today, Tomorrow, This week, Later, No date and Done sections, in that order.
A group of 2: group_by_due, group_by_due_with_order
1.1.0
py rs ts
26 tests
education.academic-year
The academic year and term a date falls in: 1 September to 31 August by default, terms from the caller.
academic_year in Python
1.0.1
py rs ts
23 tests
logistics.freight-rate
Freight charge from a carrier's dated weight-break tariff for a zone, with the fuel surcharge in force on the ship date.
freight_rate in Python
1.0.1
py rs ts
26 tests
retail.shipping-rate
Delivery charge from a dated rate table by service, zone, chargeable weight and size, with a free-over threshold.
shipping_rate in Python
1.0.1
py rs ts
20 tests
retail.coupon-validate
Check a coupon against a basket: dates, usage limits, eligible products and minimum spend, with reason codes.
validate_coupon in Python
1.0.1
py rs ts
24 tests
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
roaming_charge in Python
1.0.1
py rs ts
16 tests
charts.line-chart
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
line_chart in Python
1.0.0
py rs ts
11 tests
energy.estimate-read
Estimate a meter read for a date from the average daily consumption between two earlier reads, with rollover.
estimate_read in Python
1.0.0
py rs ts
17 tests
http.retry-after
Seconds to wait from an HTTP Retry-After header (delay-seconds or an HTTP date), or null if missing or malformed.
retry_after_seconds in Python
1.0.0
py rs ts
23 tests
inventory.expiry-fefo
First-expiry-first-out pick list for a quantity across batches, skipping expired and short-dated stock.
fefo_pick in Python
1.0.0
py rs ts
15 tests
energy.climate-change-levy
Climate Change Levy on a business supply of electricity, gas, LPG or solid fuel, at the main rate in force on the date.
climate_change_levy in Python
1.0.2
py rs ts
20 tests
finance.aged-debt
Aged debt report: open invoices bucketed as current, 1-30, 31-60, 61-90 and 90+ days overdue as at a date.
aged_debt in Python
1.0.0
py rs ts
13 tests
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interim_valuation in Python
1.0.0
py rs ts
16 tests
finance.bank-reconcile-match
Match bank statement lines to ledger entries by exact amount, a date window and reference similarity, deterministically.
match_bank_lines in Python
1.0.0
py rs ts
19 tests
finance.early-payment-discount
Early settlement discount available on a payment date under "2/10 net 30" style terms, and the amount to pay.
early_payment_discount in Python
1.0.0
py rs ts
16 tests
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
add_vat in Python
1.0.1
py rs ts
9 tests
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
remove_vat in Python
1.0.2
py rs ts
20 tests
payroll.statutory-sick-pay Unreviewed
UK Statutory Sick Pay for sickness spells: waiting days, 8-week linking, 28-week limit and the rate by date.
statutory_sick_pay in Python
1.0.1
py rs ts
19 tests
finance.tax.vat-flat-rate Unreviewed
UK VAT Flat Rate Scheme: VAT due on gross turnover at the sector's dated rate, limited cost rate and first-year 1% off.
flat_rate_vat in Python
1.0.1
py rs ts
23 tests
payroll.tax-period Unreviewed
The UK PAYE tax week, tax month and payroll period number that a pay date falls in, weeks 53, 54 and 56 included.
tax_period in Python
1.0.1
py rs ts
16 tests
invest.capital-gains-tax Unreviewed
UK Capital Gains Tax for an individual's tax year: losses, annual exempt amount, and the rates by asset and date.
capital_gains_tax in Python
1.0.1
py rs ts
24 tests
legal.court-fee Unreviewed
The court fee to issue a money claim in England and Wales, from the claim value bands in force on a date.
court_fee in Python
1.0.2
py rs ts
27 tests
retail.sales-tax-us Unreviewed
US sales tax on a sale: the state's base rate from dated data plus a local rate the caller supplies.
sales_tax_us in Python
1.1.1
py rs ts
22 tests
invest.money-weighted-return Unreviewed
Money-weighted return (XIRR) of dated cash flows on Excel's actual/365 convention, solved exactly in fixed point.
money_weighted_return in Python
1.0.1
py rs ts
24 tests
payroll.redundancy-pay Unreviewed
Statutory redundancy pay from age, completed years of service (at most 20) and a week's pay capped by date.
statutory_redundancy_pay in Python
1.0.1
py rs ts
13 tests
fleet.drivers-hours Unreviewed
Check a driver's activities against GB/EU drivers' hours: breaks after 4.5h, daily, weekly and fortnightly driving.
check_drivers_hours in Python
1.0.2
py rs ts
26 tests
todo.due-label
The short English label shown next to a todo: "2 days overdue", "Due today", "Due tomorrow", "Due Fri 2 Oct".
due_label in Python
1.0.0
py rs ts
21 tests
education.cpd-hours
CPD logged against a requirement for a rolling or fixed period: minutes counted, shortfall and days left.
cpd_hours in Python
1.0.0
py rs ts
20 tests
legal.court-deadline Unreviewed
A deadline in days under CPR 2.8: clear days, short periods skip weekends and bank holidays, court-closed days.
court_deadline in Python
1.0.1
py rs ts
23 tests
energy.tariff-time-of-use
Cost half-hourly consumption against time-of-use rates: Economy 7 windows or Agile-style half-hourly prices.
time_of_use_cost in Python
1.0.1
py rs ts
24 tests
logistics.demurrage
Demurrage or detention charge for a container: free days, then a tiered daily rate from the carrier's tariff.
demurrage in Python
1.0.0
py rs ts
22 tests
education.attendance-rate
Pupil attendance and absence rates in basis points, with the DfE persistent and severe absence flags.
attendance_rate in Python
1.0.1
py rs ts
19 tests
health.waiting-time Unreviewed
NHS England referral-to-treatment (RTT) wait in days and weekly bands, with the 18-week breach flag.
rtt_waiting_time in Python
1.0.1
py rs ts
18 tests
monitor.uptime-bars
One bar per UTC day for a status page's uptime history: seconds in each state, uptime and a colour state, oldest first.
uptime_bars in Python
1.0.0
py rs ts
17 tests
health.appointment-slots Unreviewed
Bookable appointment slots from clinic sessions, a slot length, breaks and existing bookings.
appointment_slots in Python
1.0.1
py rs ts
20 tests
fleet.tachograph-rest Unreviewed
Check daily and weekly rest against GB/EU drivers' hours: 11h daily (9h reduced, 3+9 split), 45h weekly (24h reduced).
check_tachograph_rest in Python
1.0.2
py rs ts
22 tests
charity.gift-aid-eligibility
Whether a UK donation qualifies for Gift Aid: declaration, enough tax paid, and the donor benefit limits.
gift_aid_eligibility in Python
1.0.2
py rs ts
25 tests
construction.cis-deduction
Construction Industry Scheme deduction (0, 20 or 30%) on the labour part of a subcontractor payment.
cis_deduction in Python
1.0.2
py rs ts
24 tests
charts.scale
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
A group of 7: linear_scale, invert_linear, nice_domain, log_scale, time_scale, band_scale, point_scale
1.1.0
py rs ts
93 tests
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculate_invoice in Python
1.0.1
py rs ts
15 tests
banking.faster-payments-limit
Whether a Faster Payment fits the scheme maximum, the bank's per-payment limit and what is left of its daily limit.
faster_payments_check in Python
1.0.1
py rs ts
24 tests
charity.gift-aid
Gift Aid a UK charity can claim on a donation: basic rate tax grossed up, 25p per £1 at 20%.
gift_aid in Python
1.0.2
py rs ts
15 tests
retail.oss-vat
EU distance-selling VAT: which member state's standard rate applies under OSS and the EUR 10,000 threshold, and the VAT.
oss_vat in Python
1.0.1
py rs ts
28 tests
charity.reclaim-batch
Gift Aid claim totals for a period from donation records: donor lines, aggregated small gifts, tax due.
gift_aid_claim_batch in Python
1.0.1
py rs ts
12 tests
energy.carbon-emissions
kgCO2e from kWh or litres of a fuel, using the UK government GHG conversion factors for the year.
carbon_emissions in Python
1.0.1
py rs ts
17 tests
banking.overdraft-interest
Overdraft interest for a statement period from daily balances, with an interest-free buffer.
overdraft_interest in Python
1.0.0
py rs ts
15 tests
charity.gasds
Gift Aid Small Donations Scheme top-up for a tax year: the £8,000 limit, the matching rule and community buildings.
gasds in Python
1.0.2
py rs ts
21 tests
charity.payroll-giving
UK Payroll Giving for one pay period: the donation comes off pay before PAYE, and the tax it saves the employee.
payroll_giving in Python
1.0.0
py rs ts
12 tests
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in Python
1.0.0
py rs ts
17 tests
education.student-loan-repayment
A graduate's student or postgraduate loan repayment for a tax year, as Self Assessment works it out.
student_loan_repayment in Python
1.0.1
py rs ts
21 tests
energy.water-bill
Metered water and sewerage bill from two reads: volumetric charges, return to sewer, standing and surface water charges.
water_bill in Python
1.0.0
py rs ts
14 tests
finance.late-payment-interest
UK statutory late payment interest (8% over Bank Rate) and fixed compensation under the Late Payment Act 1998.
late_payment_interest in Python
1.0.1
py rs ts
18 tests
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
mileage_allowance in Python
1.0.2
py rs ts
23 tests
hospitality.tourist-tax
Visitor levy (tourist tax) on an overnight stay: Edinburgh's 5%, Cardiff's per person per night, or a caller's own rule.
tourist_tax in Python
1.0.1
py rs ts
30 tests