# Using AI to build payroll software? Here is a deadline the official text appears to get wrong

> AI is really good at reading payroll rules. But the official consolidated text of a UK pension deadline says 19 days when the amended law says 22. What I do about it.

- Author: Sam Brown (Payroll Explained)
- Published: 2026-11-23
- Tags: AI, payroll software, pensions, auto-enrolment, legislation
- Canonical: https://payrollexplained.uk/blog/the-missing-22-days-in-regulation-16/

---

So AI is really good at this. Give a good model a spec or a regulation and
it reads it faster than I can, cross-references it and writes the code. I
use it a lot for payroll work and I wouldn't go back.

But payroll is somewhere a wrong number looks exactly like a right one. A
deadline of the 19th and a deadline of the 22nd both pass the tests you
wrote from them.

<figure>
<img src="/images/with-great-power.gif" alt="Uncle Ben in Spider-Man (2002), sitting in a car, saying: With great power comes great responsibility." width="498" height="266" loading="lazy" />
<figcaption>Uncle Ben, Spider-Man (2002).</figcaption>
</figure>

<div class="facts">
<div><strong>22nd</strong><span>the deadline if you pay electronically</span></div>
<div><strong>19 days</strong><span>all the consolidated page gives for the general rule</span></div>
<div><strong>1 Jul 2012</strong><span>when the 22 days came into force</span></div>
<div><strong>0</strong><span>"known outstanding effects", according to the banner on the page</span></div>
</div>

## The example: 19 days or 22?

When an employer takes pension contributions out of someone's pay, the
money has to reach the scheme by the 22nd of the following month if it's
paid electronically, or the 19th if not. That's what The Pensions Regulator
says and what everybody does.

The rule lives in regulation 16(1) of SI 1996/1715. The consolidated
("revised") page for it on legislation.gov.uk is where a person or a model
would go to read it, and it only says 19 days.

| Page | What it gives for the general rule |
|---|---|
| [Regulation 16, revised](https://www.legislation.gov.uk/uksi/1996/1715/regulation/16) | 19 days |
| [SI 2012/215 regulation 40, as made](https://www.legislation.gov.uk/uksi/2012/215/regulation/40/made). This is the amendment | 22 days electronic, 19 otherwise |
| [SI 2010/772 regulation 48, revised](https://www.legislation.gov.uk/uksi/2010/772/regulation/48). This holds the replacement text of regulation 16 | 22 days electronic, 19 otherwise |
| [The Pensions Regulator's code](https://www.thepensionsregulator.gov.uk/document-library/code-of-practice/administration/contributions/receiving-contributions) | day 22 electronic, day 19 otherwise |

Pick how the money was paid and the day it arrived.

<pension-due-demo>Interactive: choose electronic payment or cheque and the day of the following month the contributions reach the scheme, and see the verdict under the consolidated regulation 16 page (19 days) and under the text as amended in 2012 (22 days electronic, 19 otherwise). An electronic payment arriving on the 20th, 21st or 22nd is late on the consolidated page's wording and on time under the amended text (web version only).</pension-due-demo>

<div class="note mine">
<span class="label">My working</span>

Why I think the page is out of date, and not the regulator:

- The new regulation 16 was written in 2010 to start on 1 October 2012.
  Before it started, SI 2012/215 added the 22 days and SI 2012/1257 moved
  the start to 1 July 2012.
- Paragraph (1) on the revised page is word for word the 2010 text, and its
  footnote still says "substituted (1.10.2012)".
- The 2013 instrument that changed the rest of the regulation has a
  footnote saying it was "amended by S.I. 2012/215".

In git terms it's a stale merge. The branch was changed before merge day and
main got the old version. The site hasn't confirmed this, so "appears to be
out of date" is as far as I can go. The 22nd does show up lower down the
page, in the special rule for new joiners. It's the general rule that's
missing it. The matching [personal pensions regulation](https://www.legislation.gov.uk/uksi/2000/2692/regulation/5)
has the same gap.

</div>

Nobody paying by BACS on the 21st has done anything wrong. But a rules
engine or an AI tool built from that page would flag them as late from the
20th.

## What the government says about AI in this kind of software

HMRC published [guidelines for software developers using generative AI](https://www.gov.uk/guidance/guidelines-for-using-generative-artificial-intelligence-if-youre-a-software-developer)
on 28 January 2026. It's written about tax software, and about AI features
inside a product more than using AI to build one. I couldn't find anything
specific to payroll. It's the closest there is though, and it starts off
positive: HMRC "encourages innovative use of AI in tax software products".

| HMRC expects | What this example shows |
|---|---|
| "only use reliable source data", from "official HMRC publications", "legislation" and "established case law" | Legislation is on the list. Here the official consolidated copy appears to be the stale bit |
| "continuous monitoring, version control and timely updating of the underlying code and all relevant data sources" | You need to know which source each number came from and when you last checked it |
| "It should support, not replace, human judgment" | The model can find the page. Somebody still has to check the page |
| Tell users about "hallucinations", where the output "is factually incorrect or made up" | This isn't one. A model quoting the page perfectly would still be wrong |

## What I do about it

| Do | Why |
|---|---|
| Use the top model for research | Cheaper models are fine for boilerplate. Reading legislation is the part where you want the best one you can get. The research for this post was done with one, and it caught the stale footnote date, which wasn't in my first notes |
| Make it quote, with a link | A summary hides which version of the text it read |
| Read what changed the text | Open the instruments in the footnotes, then check whether those were amended before they started |
| Cross-check with the regulator | The Pensions Regulator's code said 22 the whole time |
| Keep a ledger of decisions | One entry per figure or date, so you can see later why the code says what it says |

A ledger entry doesn't need to be clever. This is the one for this rule:

<pre class="w-mono">
rule       pension contributions due date (general rule)
value      22nd of following month if electronic, else 19th
source     SI 2012/215 reg 40, as made
backed by  The Pensions Regulator, general code
not using  SI 1996/1715 reg 16, revised page (19 days only)
checked    23 Nov 2026
note       revised page appears to be missing the 2012 amendment
</pre>

When the page gets fixed, or a rate changes, the ledger says which lines of
code to look at.

## Sources

All checked on 23 November 2026.

- [HMRC: Guidelines for using generative artificial intelligence if you're a software developer](https://www.gov.uk/guidance/guidelines-for-using-generative-artificial-intelligence-if-youre-a-software-developer) - first published 28 January 2026.
- [HMRC: Strengthening standards for software that integrates with HMRC](https://www.gov.uk/government/publications/hmrcs-plan-to-strengthen-standards-for-third-party-software/strengthening-standards-for-software-that-integrates-with-hmrc) - 26 March 2026, repeats the generative AI expectations.
- [SI 1996/1715 regulation 16, revised](https://www.legislation.gov.uk/uksi/1996/1715/regulation/16) - paragraph (1), the banner and footnotes F1 and F2.
- [SI 2010/772 regulation 48, as made](https://www.legislation.gov.uk/uksi/2010/772/regulation/48/made) - the 2010 text, 19 days. [Revised](https://www.legislation.gov.uk/uksi/2010/772/regulation/48) - with the 22 days.
- [SI 2012/215 regulation 40, as made](https://www.legislation.gov.uk/uksi/2012/215/regulation/40/made) - adds the 22 days. [Regulation 41](https://www.legislation.gov.uk/uksi/2012/215/regulation/41/made) - the same for personal pensions. [Regulation 1](https://www.legislation.gov.uk/uksi/2012/215/regulation/1/made) - in force 1 July 2012.
- [SI 2012/1257 regulation 3, as made](https://www.legislation.gov.uk/uksi/2012/1257/regulation/3/made) - moves the start of the 2010 Regulations from 1 October 2012 to 1 July 2012.
- [SI 2013/2556 regulation 2, as made](https://www.legislation.gov.uk/uksi/2013/2556/regulation/2/made) - replaces paragraphs (2) and (3), with the footnote about SI 2012/215.
- [SI 2000/2692 regulation 5, revised](https://www.legislation.gov.uk/uksi/2000/2692/regulation/5) - the personal pensions rule.
- [The Pensions Regulator, general code of practice: Receiving contributions](https://www.thepensionsregulator.gov.uk/document-library/code-of-practice/administration/contributions/receiving-contributions) - in force 28 March 2024.

*My reading of the published texts as at 23 November 2026. Not legal
advice. legislation.gov.uk hasn't confirmed the page is out of date. The
widget shows the general rule only.*
