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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
parseDatePhrase in TypeScript
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.
isLeapYear in TypeScript
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.
limitationDate in TypeScript
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.
ageInMonths in TypeScript
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.
gestationalAge in TypeScript
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.
ageBand in TypeScript
1.0.1
py rs ts
18 tests
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
uptimeBars in TypeScript
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.
appointmentSlots in TypeScript
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).
checkTachographRest in TypeScript
1.0.2
py rs ts
22 tests
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
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
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
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
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
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
education.student-loan-repayment
A graduate's student or postgraduate loan repayment for a tax year, as Self Assessment works it out.
studentLoanRepayment in TypeScript
1.0.1
py rs ts
21 tests
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
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
charity.reclaim-batch
Gift Aid claim totals for a period from donation records: donor lines, aggregated small gifts, tax due.
giftAidClaimBatch in TypeScript
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.
carbonEmissions in TypeScript
1.0.1
py rs ts
17 tests
finance.late-payment-interest
UK statutory late payment interest (8% over Bank Rate) and fixed compensation under the Late Payment Act 1998.
latePaymentInterest in TypeScript
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.
mileageAllowance in TypeScript
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.
touristTax in TypeScript
1.0.1
py rs ts
30 tests
banking.overdraft-interest
Overdraft interest for a statement period from daily balances, with an interest-free buffer.
overdraftInterest in TypeScript
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 TypeScript
1.0.2
py rs ts
21 tests
charity.higher-rate-relief
A Gift Aid donor's extra tax relief at higher, intermediate, additional and top rates, by extending the tax bands.
higherRateRelief in TypeScript
1.0.0
py rs ts
16 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.
payrollGiving in TypeScript
1.0.0
py rs ts
12 tests