dates.age
Age in whole years on a given date, with 29 February birthdays ageing on 1 March in other years.
age in TypeScript
1.0.0
py rs ts
18 tests
Apache-2.0
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 TypeScript
1.0.0
py rs ts
25 tests
Apache-2.0
dates.overlap
Days two date ranges have in common, with the end of each range stated as inclusive or exclusive.
overlapDays in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
construction.payment-notice-dates
Construction Act default dates: payment due, payment notice, final date for payment and pay-less notice.
paymentNoticeDates in TypeScript
1.0.2
py rs ts
21 tests
Apache-2.0 AND OGL-UK-3.0
dates.add-days
Shift an ISO date by a whole number of days, forwards or backwards, with exact calendar arithmetic.
addDays in TypeScript
1.0.0
py rs ts
28 tests
Apache-2.0
dates.days-between
Calendar days from one ISO date to another, signed: negative when the second date is earlier.
daysBetween in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
dates.add-months
Add calendar months to an ISO date, clamping to the month end: 31 Jan + 1 month is 28 or 29 Feb.
addMonths in TypeScript
1.0.0
py rs ts
22 tests
Apache-2.0
dates.add-business-days
Move a date forward or back by working days, skipping weekends and a caller-supplied holiday list.
addBusinessDays in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
dates.month-boundaries
The first day, last day and length of the calendar month containing a date.
monthBoundaries in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
dates.business-days-between
Working days between two dates, excluding weekends and a caller-supplied holiday list.
businessDaysBetween in TypeScript
1.0.0
py rs ts
26 tests
Apache-2.0
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.
dayCountFraction in TypeScript
1.0.0
py rs ts
21 tests
Apache-2.0
dates.uk-tax-year
The UK personal tax year containing a date: 6 April to 5 April, with HMRC's label.
ukTaxYear in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
dates.day-of-week
The ISO 8601 day of the week for a date: 1 is Monday through 7 is Sunday.
dayOfWeek in TypeScript
1.0.0
py rs ts
20 tests
Apache-2.0
dates.quarter
Calendar quarter and fiscal quarter of a date, with the fiscal year and quarter date ranges, for any start month.
quarter in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
dates.bank-holidays
UK bank and public holidays for a region and year, as published by gov.uk, including one-off holidays.
bankHolidays in TypeScript
1.0.1
py rs ts
15 tests
Apache-2.0 AND OGL-UK-3.0
dates.week-number
ISO 8601 week number and week-numbering year of a date: weeks start Monday, week 1 holds the first Thursday.
weekNumber in TypeScript
1.0.0
py rs ts
18 tests
Apache-2.0
banking.bacs-processing-date
Bacs three-day cycle: input, processing and entry (arrival) dates for a submission, skipping weekends and bank holidays.
bacsProcessingDates in TypeScript
1.0.0
py rs ts
18 tests
Apache-2.0
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.
validateDateParts in TypeScript
1.0.1
py rs ts
49 tests
Apache-2.0
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.
regularGivingSchedule in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
form.iso-date
Check a date picker value (YYYY-MM-DD) against required, past/future and min/max rules, timezone-safe.
validateIsoDate in TypeScript
1.0.0
py rs ts
24 tests
Apache-2.0
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.
paymentDueDate in TypeScript
1.0.0
py rs ts
26 tests
Apache-2.0
logistics.delivery-date
Estimated dispatch and delivery dates from order time, dispatch cut-off, service days, weekends and UK bank holidays.
deliveryDate in TypeScript
1.0.0
py rs ts
26 tests
Apache-2.0
1.0.0
py rs ts
21 tests
Apache-2.0
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.
parseDatePhrase in TypeScript
1.0.0
py rs ts
53 tests
Apache-2.0
dates.is-leap-year
Whether a year is a Gregorian leap year: every 4th, except centuries, except every 400th.
isLeapYear in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
react.form.date-field React ^19 · TypeScript only
A labelled date picker (<input type="date">) with min and max, checked by form.iso-date, its error shown accessibly.
DateField in TypeScript
1.0.0
ts
14 tests
Apache-2.0
legal.limitation-date Unreviewed
The last day to bring a claim under the Limitation Act 1980, by claim type, from the date it accrued.
limitationDate in TypeScript
1.0.1
py rs ts
26 tests
Apache-2.0 AND OGL-UK-3.0
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.
ageInMonths in TypeScript
1.0.1
py rs ts
19 tests
Apache-2.0
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
ageBand in TypeScript
1.0.1
py rs ts
18 tests
Apache-2.0
health.gestational-age Unreviewed
Gestational age (weeks+days) and estimated due date from the last menstrual period by Naegele's rule, cycle-adjusted.
gestationalAge in TypeScript
1.0.1
py rs ts
20 tests
Apache-2.0
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).
DateInput in TypeScript
1.0.1
ts
14 tests
Apache-2.0
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.
schoolYearGroup in TypeScript
1.0.1
py rs ts
22 tests
Apache-2.0 AND OGL-UK-3.0
charts.format → formatDate
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
formatDate in TypeScript, one function of this group
1.0.0
py rs ts
61 tests
Apache-2.0
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.
rescheduleRecurrence in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
manufacturing.lot-number
Deterministic lot or batch code YYDDD-LL-SSS from the production date (Julian day), line and sequence.
lotNumber in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
todo.sort
Sort todos by manual order, due date, priority, creation time or title, stably, with sensible tie-breakers.
sortTodos in TypeScript
1.0.0
py rs ts
20 tests
Apache-2.0
subscriptions.dunning-schedule
Retry dates for a failed subscription payment from a retry policy, in calendar or business days.
dunningSchedule in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
todo.next-occurrence
The next due date of a repeating todo once it is done: daily, weekdays, weekly, monthly or yearly, month-end safe.
nextOccurrence in TypeScript
1.0.0
py rs ts
24 tests
Apache-2.0
time.minutes-between
Minutes from one local date and time to another, correct across midnight; wall-clock time, no time zones.
minutesBetween in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
fleet.service-due
Next vehicle service by months or miles, whichever comes first, projecting the mileage date, with an overdue flag.
serviceDue in TypeScript
1.0.0
py rs ts
18 tests
Apache-2.0
education.fee-instalments
Tuition fee instalment schedule from a total, shares and due dates, exact to the penny.
feeInstalments in TypeScript
1.0.0
py rs ts
20 tests
Apache-2.0
finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
vatRate in TypeScript
1.2.2
py rs ts
25 tests
Apache-2.0 AND OGL-UK-3.0
todo.due-status
Where a todo stands against its due date today: done, overdue, today, tomorrow, this week, later or no date.
dueStatus in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
hr.length-of-service
Continuous service between two dates in completed years, months and days, counting both end dates.
lengthOfService in TypeScript
1.0.0
py rs ts
11 tests
Apache-2.0
subscriptions.trial-end
When a free trial ends and the first payment is due, from the trial's start date and length in days.
trialEnd in TypeScript
1.0.0
py rs ts
12 tests
Apache-2.0
retail.shipping-rate
Delivery charge from a dated rate table by service, zone, chargeable weight and size, with a free-over threshold.
shippingRate in TypeScript
1.0.1
py rs ts
20 tests
Apache-2.0
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: groupByDue, groupByDueWithOrder
1.1.0
py rs ts
26 tests
Apache-2.0
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.
climateChangeLevy in TypeScript
1.0.2
py rs ts
20 tests
Apache-2.0 AND OGL-UK-3.0
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
roamingCharge in TypeScript
1.0.1
py rs ts
16 tests
Apache-2.0
energy.price-cap
Ofgem energy price cap unit rate and daily standing charge for a fuel and payment method on a date (GB average).
priceCap in TypeScript
1.0.2
py rs ts
19 tests
Apache-2.0 AND OGL-UK-3.0
education.academic-year
The academic year and term a date falls in: 1 September to 31 August by default, terms from the caller.
academicYear in TypeScript
1.0.1
py rs ts
23 tests
Apache-2.0
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.
agedDebt in TypeScript
1.0.0
py rs ts
13 tests
Apache-2.0
finance.uk-bank-rate
Bank of England Bank Rate (base rate) in force on a date, from the Bank's official history since 2001.
ukBankRate in TypeScript
1.0.1
py rs ts
14 tests
Apache-2.0 AND OGL-UK-3.0
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.
freightRate in TypeScript
1.0.1
py rs ts
26 tests
Apache-2.0
retail.coupon-validate
Check a coupon against a basket: dates, usage limits, eligible products and minimum spend, with reason codes.
validateCoupon in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interimValuation in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
charts.line-chart
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
lineChart in TypeScript
1.0.0
py rs ts
11 tests
Apache-2.0
http.retry-after
Seconds to wait from an HTTP Retry-After header (delay-seconds or an HTTP date), or null if missing or malformed.
retryAfterSeconds in TypeScript
1.0.0
py rs ts
23 tests
Apache-2.0
inventory.expiry-fefo
First-expiry-first-out pick list for a quantity across batches, skipping expired and short-dated stock.
fefoPick in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
energy.estimate-read
Estimate a meter read for a date from the average daily consumption between two earlier reads, with rollover.
estimateRead in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
finance.bank-reconcile-match
Match bank statement lines to ledger entries by exact amount, a date window and reference similarity, deterministically.
matchBankLines in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
finance.early-payment-discount
Early settlement discount available on a payment date under "2/10 net 30" style terms, and the amount to pay.
earlyPaymentDiscount in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
addVat in TypeScript
1.0.1
py rs ts
9 tests
Apache-2.0
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
removeVat in TypeScript
1.0.2
py rs ts
20 tests
Apache-2.0
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.
courtFee in TypeScript
1.0.2
py rs ts
27 tests
Apache-2.0 AND OGL-UK-3.0
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.
insurancePremiumTax in TypeScript
1.0.2
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
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.
taxPeriod in TypeScript
1.0.1
py rs ts
16 tests
Apache-2.0 AND OGL-UK-3.0
payroll.redundancy-pay Unreviewed
Statutory redundancy pay from age, completed years of service (at most 20) and a week's pay capped by date.
statutoryRedundancyPay in TypeScript
1.0.1
py rs ts
13 tests
Apache-2.0 AND OGL-UK-3.0
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.
flatRateVat in TypeScript
1.0.1
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
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.
statutorySickPay in TypeScript
1.0.1
py rs ts
19 tests
Apache-2.0 AND OGL-UK-3.0
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.
salesTaxUs in TypeScript
1.1.1
py rs ts
22 tests
Apache-2.0
invest.money-weighted-return Unreviewed
Money-weighted return (XIRR) of dated cash flows on Excel's actual/365 convention, solved exactly in fixed point.
moneyWeightedReturn in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0
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.
capitalGainsTax in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
fleet.drivers-hours Unreviewed
Check a driver's activities against GB/EU drivers' hours: breaks after 4.5h, daily, weekly and fortnightly driving.
checkDriversHours in TypeScript
1.0.2
py rs ts
26 tests
Apache-2.0 AND OGL-UK-3.0
todo.due-label
The short English label shown next to a todo: "2 days overdue", "Due today", "Due tomorrow", "Due Fri 2 Oct".
dueLabel in TypeScript
1.0.0
py rs ts
21 tests
Apache-2.0
education.cpd-hours
CPD logged against a requirement for a rolling or fixed period: minutes counted, shortfall and days left.
cpdHours in TypeScript
1.0.0
py rs ts
20 tests
Apache-2.0
legal.court-deadline Unreviewed
A deadline in days under CPR 2.8: clear days, short periods skip weekends and bank holidays, court-closed days.
courtDeadline in TypeScript
1.0.1
py rs ts
23 tests
Apache-2.0
energy.tariff-time-of-use
Cost half-hourly consumption against time-of-use rates: Economy 7 windows or Agile-style half-hourly prices.
timeOfUseCost in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0
logistics.demurrage
Demurrage or detention charge for a container: free days, then a tiered daily rate from the carrier's tariff.
demurrage in TypeScript
1.0.0
py rs ts
22 tests
Apache-2.0
education.attendance-rate
Pupil attendance and absence rates in basis points, with the DfE persistent and severe absence flags.
attendanceRate in TypeScript
1.0.1
py rs ts
19 tests
Apache-2.0 AND OGL-UK-3.0
health.waiting-time Unreviewed
NHS England referral-to-treatment (RTT) wait in days and weekly bands, with the 18-week breach flag.
rttWaitingTime in TypeScript
1.0.1
py rs ts
18 tests
Apache-2.0
health.appointment-slots Unreviewed
Bookable appointment slots from clinic sessions, a slot length, breaks and existing bookings.
appointmentSlots in TypeScript
1.0.1
py rs ts
20 tests
Apache-2.0
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).
checkTachographRest in TypeScript
1.0.2
py rs ts
22 tests
Apache-2.0 AND OGL-UK-3.0
react.form.fieldset React ^19 · TypeScript only
Group related inputs under a legend, with a hint and error message described to the whole group (GOV.UK fieldset).
Fieldset in TypeScript
1.0.1
ts
10 tests
Apache-2.0
retail.basket-total
Total a basket: line prices, promotions, a basket discount, VAT per line and delivery, into one checked total.
basketTotal in TypeScript
1.0.0
py rs ts
10 tests
Apache-2.0
react.form.error-summary React ^19 · TypeScript only
A "There is a problem" box linking to each field in error, focused on arrival, built from a validator's fields (GOV.UK).
A group of 2: errorSummaryItems, ErrorSummary
1.0.1
ts
21 tests
Apache-2.0
time.unix-to-iso
Unix time in seconds to an ISO 8601 UTC timestamp such as 2026-09-26T12:00:00Z, for years 0001 to 9999.
unixToIso in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculateInvoice in TypeScript
1.0.1
py rs ts
15 tests
Apache-2.0
construction.cis-deduction
Construction Industry Scheme deduction (0, 20 or 30%) on the labour part of a subcontractor payment.
cisDeduction in TypeScript
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
construction.vat-reverse-charge
Whether the UK VAT domestic reverse charge applies to a construction supply, and the invoice wording.
domesticReverseCharge in TypeScript
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
charity.gift-aid
Gift Aid a UK charity can claim on a donation: basic rate tax grossed up, 25p per £1 at 20%.
giftAid in TypeScript
1.0.2
py rs ts
15 tests
Apache-2.0 AND OGL-UK-3.0
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
mileageAllowance in TypeScript
1.0.2
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
charity.gift-aid-eligibility
Whether a UK donation qualifies for Gift Aid: declaration, enough tax paid, and the donor benefit limits.
giftAidEligibility in TypeScript
1.0.2
py rs ts
25 tests
Apache-2.0 AND OGL-UK-3.0
charts.scale
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
A group of 7: linearScale, invertLinear, niceDomain, logScale, timeScale, bandScale, pointScale
1.1.0
py rs ts
93 tests
Apache-2.0
todo.list
The to-do list reducer: add, edit, complete, remove, clear and reorder todos, each returning a new list.
A group of 8: addTodo, updateTodo, toggleTodo, removeTodo, clearCompleted, toggleAll, moveTodo, toggleAllMode
1.1.0
py rs ts
102 tests
Apache-2.0
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 TypeScript
1.0.2
py rs ts
21 tests
Apache-2.0 AND OGL-UK-3.0
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
A group of 5: axisFromTicks, numberAxis, timeAxis, bandAxis, gridLines
1.0.1
py rs ts
49 tests
Apache-2.0
energy.carbon-emissions
kgCO2e from kWh or litres of a fuel, using the UK government GHG conversion factors for the year.
carbonEmissions in TypeScript
1.0.1
py rs ts
17 tests
Apache-2.0 AND OGL-UK-3.0
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.
fasterPaymentsCheck in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0
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.
ossVat in TypeScript
1.0.1
py rs ts
28 tests
Apache-2.0