payment_terms v1

The day a commercial invoice falls due when no day was agreed: the last day of the 30 days beginning with the day the buyer had the invoice. As this module reads the Late Payment of Commercial Debts (Interest) Act 1998, section 4(2A) and (2H); it says nothing of how the law is read

File
payment_terms.cal (dates payment_terms v1, sha256:44ffa0c627623eb3)
koyomi
0.56.0

koyomi 0.56.0 made this page by checking the files above. If a file's digest is no longer what it says here, the page is out of date.

Every date computes on all 730 days of invoiced (2026-01-01..2027-12-31); 2 examples match.

How the dates are computed

Each date, operation by operation from the top, in words. The code after each is the line as the .cal writes it (# starts a comment).

due

From invoiced, in this order:

  1. 29 days later + 29 days # the last of the 30 days

What was checked

Every date was computed, and every claim checked, on all 730 days of invoiced (2026-01-01..2027-12-31).

The file states no claims.

Days a month does not have

No operation of this file can land on a day its month does not have, such as 30 February.

Edge cases

Inputs koyomi picked from the range: month ends, closed days and the days around them, inputs that land on a missing day, the least room a claim has, and so on. Each row is the first input the check computed of those that do what its last column says.

invoiceddueWhy
2026-01-31 Sat2026-03-01 Suninvoiced is the 31st, the end of its month
2026-02-28 Sat2026-03-29 Suninvoiced is 28 February, the end of the month in a year that is not a leap year
2026-04-30 Thu2026-05-29 Friinvoiced is the 30th, the end of its month

Examples

The rows the .cal writes under examples, and what the computation gives.

invoiced→ dueResult
2026-03-02 Mon2026-03-31 Tuematches
2027-12-31 Fri2028-01-29 Satmatches

Calendar

The file reads no calendar, so no day is closed.

Month by month

The inputs and the dates computed from them fall in the 25 months of 2026-01..2028-01. Only the 5 months that hold an input a claim fails on, or an edge case's input or dates, are shown; 20 are left out.

January 2026
MonTueWedThuFriSatSun
1234
567891011
12131415161718
19202122232425
262728293031
February 2026
MonTueWedThuFriSatSun
1
2345678
9101112131415
16171819202122
232425262728
March 2026
MonTueWedThuFriSatSun
1
2345678
9101112131415
16171819202122
23242526272829
3031
April 2026
MonTueWedThuFriSatSun
12345
6789101112
13141516171819
20212223242526
27282930
May 2026
MonTueWedThuFriSatSun
123
45678910
11121314151617
18192021222324
25262728293031