@casomoltd/nhs-pay 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/additional-pension.d.ts +104 -0
- package/dist/additional-pension.js +163 -0
- package/dist/additional-pension.js.map +1 -0
- package/dist/dates.d.ts +21 -8
- package/dist/dates.js +46 -18
- package/dist/dates.js.map +1 -1
- package/dist/errors.d.ts +26 -0
- package/dist/errors.js +29 -0
- package/dist/errors.js.map +1 -1
- package/dist/factor-basis.d.ts +75 -22
- package/dist/factor-basis.js +95 -24
- package/dist/factor-basis.js.map +1 -1
- package/dist/gad/additional-pension-0-703-2023-10-03.d.ts +180 -0
- package/dist/gad/additional-pension-0-703-2023-10-03.js +87 -0
- package/dist/gad/additional-pension-0-703-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-712-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-712-2023-10-03.js +170 -0
- package/dist/gad/additional-pension-0-712-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-713-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-713-2023-10-03.js +173 -0
- package/dist/gad/additional-pension-0-713-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-714-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-714-2023-10-03.js +176 -0
- package/dist/gad/additional-pension-0-714-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-715-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-715-2023-10-03.js +179 -0
- package/dist/gad/additional-pension-0-715-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-716-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-716-2023-10-03.js +170 -0
- package/dist/gad/additional-pension-0-716-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-717-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-717-2023-10-03.js +173 -0
- package/dist/gad/additional-pension-0-717-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-718-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-718-2023-10-03.js +176 -0
- package/dist/gad/additional-pension-0-718-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-719-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-719-2023-10-03.js +179 -0
- package/dist/gad/additional-pension-0-719-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-table.d.ts +51 -0
- package/dist/gad/additional-pension-table.js +23 -0
- package/dist/gad/additional-pension-table.js.map +1 -0
- package/dist/gad/factor-table.d.ts +7 -3
- package/dist/gad/factor-table.js.map +1 -1
- package/dist/gad/lrf-0-422-2023-06-30.d.ts +45 -0
- package/dist/gad/lrf-0-422-2023-06-30.js +70 -0
- package/dist/gad/lrf-0-422-2023-06-30.js.map +1 -0
- package/dist/gad/lrf-2023-06-30.d.ts +3 -3
- package/dist/gad/lrf-2023-06-30.js +3 -3
- package/dist/index.d.ts +12 -8
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/member-benefits.d.ts +16 -1
- package/dist/member-benefits.js +19 -3
- package/dist/member-benefits.js.map +1 -1
- package/dist/pension/history.d.ts +0 -8
- package/dist/pension/history.js +10 -4
- package/dist/pension/history.js.map +1 -1
- package/dist/pension/ledger.d.ts +59 -32
- package/dist/pension/ledger.js +129 -100
- package/dist/pension/ledger.js.map +1 -1
- package/dist/pension/prices.d.ts +75 -58
- package/dist/pension/prices.js +111 -42
- package/dist/pension/prices.js.map +1 -1
- package/dist/pension/uplift.d.ts +32 -24
- package/dist/pension/uplift.js +66 -18
- package/dist/pension/uplift.js.map +1 -1
- package/dist/pension-projection.d.ts +3 -3
- package/dist/pension-projection.js +8 -13
- package/dist/pension-projection.js.map +1 -1
- package/dist/sections/section-1995.d.ts +2 -2
- package/dist/sections/section-1995.js +3 -3
- package/dist/sections/section-1995.js.map +1 -1
- package/dist/sections/section-2008.js +5 -3
- package/dist/sections/section-2008.js.map +1 -1
- package/dist/sections/section-2015.d.ts +8 -7
- package/dist/sections/section-2015.js +14 -10
- package/dist/sections/section-2015.js.map +1 -1
- package/dist/sources.d.ts +3 -0
- package/dist/sources.js +14 -0
- package/dist/sources.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -149,7 +149,9 @@ unpublished nation/year or grade rather than defaulting.
|
|
|
149
149
|
### Value a member's pension across sections
|
|
150
150
|
|
|
151
151
|
```ts
|
|
152
|
-
import {
|
|
152
|
+
import {
|
|
153
|
+
PAST_YEARS, SECTIONS, isoDate, memberBenefits,
|
|
154
|
+
} from '@casomoltd/nhs-pay';
|
|
153
155
|
|
|
154
156
|
// Built once from the member; `today` pins the date the figures
|
|
155
157
|
// are as at, so they reproduce.
|
|
@@ -169,7 +171,9 @@ const benefits = memberBenefits(
|
|
|
169
171
|
},
|
|
170
172
|
statement: null, // or a 2015 Section balance off a statement
|
|
171
173
|
},
|
|
172
|
-
|
|
174
|
+
// `published` prices the past on each year's Revaluation Order,
|
|
175
|
+
// as an Annual Benefit Statement does; `assumed` on the CPI below.
|
|
176
|
+
{assumedCpi: 0.02, pastYears: PAST_YEARS.published},
|
|
173
177
|
new Date(2026, 8, 23),
|
|
174
178
|
);
|
|
175
179
|
|
|
@@ -350,8 +354,9 @@ restates it: enter its figure and ask for its own date, and you
|
|
|
350
354
|
are handed back exactly what it says. See
|
|
351
355
|
[*Two rulers, one model*](docs/how-it-works.md#two-rulers-one-model)
|
|
352
356
|
for how cash and today's money are produced, and
|
|
353
|
-
[*
|
|
354
|
-
for
|
|
357
|
+
[*Which series applies a published Order*](docs/how-it-works.md#which-series-applies-a-published-order)
|
|
358
|
+
for when a legislated rate is applied and why today's money
|
|
359
|
+
never takes one.
|
|
355
360
|
|
|
356
361
|
That promise is exact for a statement handed over **with its
|
|
357
362
|
date**. Passing the figure undated instead asks a different
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buying additional pension in the 2015 Scheme: how much a member would
|
|
3
|
+
* buy now for a pension they want when they draw it, and what it costs.
|
|
4
|
+
*
|
|
5
|
+
* Additional pension is bought in units of £250 a year, valued at the date
|
|
6
|
+
* the election is made, and priced from GAD's purchase tables
|
|
7
|
+
* (`src/gad/additional-pension-*.ts`): a single lump sum, or monthly
|
|
8
|
+
* instalments over whole years ending before the Normal Pension Age.
|
|
9
|
+
*
|
|
10
|
+
* Once bought it is 2015 Scheme pension, revalued by each year's Order
|
|
11
|
+
* for prices alone (without the 1.5 the main pension adds) until it is
|
|
12
|
+
* paid, and taken early or late on the factors GAD publishes for it,
|
|
13
|
+
* read through `readFactor`.
|
|
14
|
+
*
|
|
15
|
+
* Sources: the workbook (tables 0-703, 0-712 to 0-719, 0-422) and
|
|
16
|
+
* NHSBSA's additional pension factsheet (the limit and the unit) — see
|
|
17
|
+
* docs/source-archive.md.
|
|
18
|
+
*/
|
|
19
|
+
import type { AdditionalPensionCover, AdditionalPensionProvenance } from './gad/additional-pension-table.js';
|
|
20
|
+
/** The unit additional pension is bought in, a year, per
|
|
21
|
+
* `AP_FACTSHEET_2026`. */
|
|
22
|
+
export declare const ADDITIONAL_PENSION_UNIT = 250;
|
|
23
|
+
/**
|
|
24
|
+
* The most additional pension a member may buy, a year, between `from`
|
|
25
|
+
* and `until`; it is uprated by Treasury order each April. It is an
|
|
26
|
+
* overall limit, so earlier purchases count against it; this library
|
|
27
|
+
* prices one purchase and cannot see a member's earlier ones.
|
|
28
|
+
*
|
|
29
|
+
* `until` is the first day of the month the next uprating is expected
|
|
30
|
+
* in: the day it takes effect has not been read at source, so an
|
|
31
|
+
* election that month is refused rather than priced on a stale limit.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ADDITIONAL_PENSION_LIMIT: {
|
|
34
|
+
readonly annual: 9053;
|
|
35
|
+
readonly from: import("./iso-date.js").IsoDate;
|
|
36
|
+
readonly until: import("./iso-date.js").IsoDate;
|
|
37
|
+
readonly source: import("./document-source.js").DocumentSource;
|
|
38
|
+
};
|
|
39
|
+
/** How a purchase is paid for. */
|
|
40
|
+
export declare const ADDITIONAL_PENSION_PAYMENTS: {
|
|
41
|
+
/** One premium, at the election. */
|
|
42
|
+
readonly lumpSum: "lump-sum";
|
|
43
|
+
/** Monthly, from pay, for whole years ending before the pension age. */
|
|
44
|
+
readonly instalments: "instalments";
|
|
45
|
+
};
|
|
46
|
+
export type AdditionalPensionPayment = {
|
|
47
|
+
readonly kind: typeof ADDITIONAL_PENSION_PAYMENTS.lumpSum;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: typeof ADDITIONAL_PENSION_PAYMENTS.instalments;
|
|
50
|
+
readonly years: number;
|
|
51
|
+
};
|
|
52
|
+
/** One priced purchase. */
|
|
53
|
+
export interface AdditionalPensionPurchase {
|
|
54
|
+
/** The pension bought, a year, at the date of election. */
|
|
55
|
+
readonly annual: number;
|
|
56
|
+
readonly cover: AdditionalPensionCover;
|
|
57
|
+
readonly payment: AdditionalPensionPayment;
|
|
58
|
+
/** The lump sum, or each monthly instalment, in pounds and pence. */
|
|
59
|
+
readonly cost: number;
|
|
60
|
+
/** The table the price was read from. */
|
|
61
|
+
readonly table: AdditionalPensionProvenance;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The price of buying `annual` a year of additional pension, as a lump
|
|
65
|
+
* sum or monthly instalments, read from GAD's tables at the member's age
|
|
66
|
+
* last birthday on the date of election ("age when notice of election is
|
|
67
|
+
* given"). The instalment table is the one for the member's own Normal
|
|
68
|
+
* Pension Age, from their date of birth.
|
|
69
|
+
*
|
|
70
|
+
* Refused, by code: an amount off the £250 unit or over the limit, an
|
|
71
|
+
* election outside the dates the tables and the limit hold for, or an
|
|
72
|
+
* age or period the table does not print.
|
|
73
|
+
*/
|
|
74
|
+
export declare function additionalPensionCost(input: {
|
|
75
|
+
readonly annual: number;
|
|
76
|
+
readonly dateOfBirth: Date;
|
|
77
|
+
readonly election: Date;
|
|
78
|
+
readonly cover: AdditionalPensionCover;
|
|
79
|
+
readonly payment: AdditionalPensionPayment;
|
|
80
|
+
}): AdditionalPensionPurchase;
|
|
81
|
+
/**
|
|
82
|
+
* How much additional pension to buy now, a year, for `wanted` a year
|
|
83
|
+
* when it is drawn, in today's money, for a member paying in until they
|
|
84
|
+
* leave on the day they draw.
|
|
85
|
+
*
|
|
86
|
+
* Additional pension keeps pace with prices and no more: each Order's
|
|
87
|
+
* price change, with no 1.5 added, while in service (the "AP index
|
|
88
|
+
* adjustment", SI 2015/94 Sch 9 para 1) and in the leaving year (para
|
|
89
|
+
* 4). So in today's money it does not grow between the election and
|
|
90
|
+
* the drawing, where the rest of the 2015 pension gains 1.5% a year.
|
|
91
|
+
* Then the early or late factor for additional pension at the drawing.
|
|
92
|
+
* Rounded UP to whole £250 units: the smallest purchase that reaches
|
|
93
|
+
* the amount wanted.
|
|
94
|
+
*
|
|
95
|
+
* Refused: a member who leaves before drawing (deferred growth is not
|
|
96
|
+
* modelled), or a purchase over the limit.
|
|
97
|
+
*/
|
|
98
|
+
export declare function additionalPensionToBuy(input: {
|
|
99
|
+
readonly wanted: number;
|
|
100
|
+
readonly dateOfBirth: Date;
|
|
101
|
+
readonly election: Date;
|
|
102
|
+
readonly leaving: Date;
|
|
103
|
+
readonly drawing: Date;
|
|
104
|
+
}): number;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buying additional pension in the 2015 Scheme: how much a member would
|
|
3
|
+
* buy now for a pension they want when they draw it, and what it costs.
|
|
4
|
+
*
|
|
5
|
+
* Additional pension is bought in units of £250 a year, valued at the date
|
|
6
|
+
* the election is made, and priced from GAD's purchase tables
|
|
7
|
+
* (`src/gad/additional-pension-*.ts`): a single lump sum, or monthly
|
|
8
|
+
* instalments over whole years ending before the Normal Pension Age.
|
|
9
|
+
*
|
|
10
|
+
* Once bought it is 2015 Scheme pension, revalued by each year's Order
|
|
11
|
+
* for prices alone (without the 1.5 the main pension adds) until it is
|
|
12
|
+
* paid, and taken early or late on the factors GAD publishes for it,
|
|
13
|
+
* read through `readFactor`.
|
|
14
|
+
*
|
|
15
|
+
* Sources: the workbook (tables 0-703, 0-712 to 0-719, 0-422) and
|
|
16
|
+
* NHSBSA's additional pension factsheet (the limit and the unit) — see
|
|
17
|
+
* docs/source-archive.md.
|
|
18
|
+
*/
|
|
19
|
+
import { periodInYearsMonths } from './dates.js';
|
|
20
|
+
import { ADDITIONAL_PENSION_REFUSALS, AdditionalPensionUnavailable, invariant, } from './errors.js';
|
|
21
|
+
import { FACTOR_APPLIES } from './factor-basis.js';
|
|
22
|
+
import { AP_0_703 } from './gad/additional-pension-0-703-2023-10-03.js';
|
|
23
|
+
import { AP_0_712 } from './gad/additional-pension-0-712-2023-10-03.js';
|
|
24
|
+
import { AP_0_713 } from './gad/additional-pension-0-713-2023-10-03.js';
|
|
25
|
+
import { AP_0_714 } from './gad/additional-pension-0-714-2023-10-03.js';
|
|
26
|
+
import { AP_0_715 } from './gad/additional-pension-0-715-2023-10-03.js';
|
|
27
|
+
import { AP_0_716 } from './gad/additional-pension-0-716-2023-10-03.js';
|
|
28
|
+
import { AP_0_717 } from './gad/additional-pension-0-717-2023-10-03.js';
|
|
29
|
+
import { AP_0_718 } from './gad/additional-pension-0-718-2023-10-03.js';
|
|
30
|
+
import { AP_0_719 } from './gad/additional-pension-0-719-2023-10-03.js';
|
|
31
|
+
import { isoDate, isoToDate } from './iso-date.js';
|
|
32
|
+
import { normalPensionAge } from './npa.js';
|
|
33
|
+
import { inflationFactor, TODAYS_MONEY_CPI } from './pension/prices.js';
|
|
34
|
+
import { factor2015 } from './sections/section-2015.js';
|
|
35
|
+
import { AP_FACTSHEET_2026 } from './sources.js';
|
|
36
|
+
/** The unit additional pension is bought in, a year, per
|
|
37
|
+
* `AP_FACTSHEET_2026`. */
|
|
38
|
+
export const ADDITIONAL_PENSION_UNIT = 250;
|
|
39
|
+
/**
|
|
40
|
+
* The most additional pension a member may buy, a year, between `from`
|
|
41
|
+
* and `until`; it is uprated by Treasury order each April. It is an
|
|
42
|
+
* overall limit, so earlier purchases count against it; this library
|
|
43
|
+
* prices one purchase and cannot see a member's earlier ones.
|
|
44
|
+
*
|
|
45
|
+
* `until` is the first day of the month the next uprating is expected
|
|
46
|
+
* in: the day it takes effect has not been read at source, so an
|
|
47
|
+
* election that month is refused rather than priced on a stale limit.
|
|
48
|
+
*/
|
|
49
|
+
export const ADDITIONAL_PENSION_LIMIT = {
|
|
50
|
+
annual: 9_053,
|
|
51
|
+
from: isoDate('2026-04-01'),
|
|
52
|
+
until: isoDate('2027-04-01'),
|
|
53
|
+
source: AP_FACTSHEET_2026,
|
|
54
|
+
};
|
|
55
|
+
/** How a purchase is paid for. */
|
|
56
|
+
export const ADDITIONAL_PENSION_PAYMENTS = {
|
|
57
|
+
/** One premium, at the election. */
|
|
58
|
+
lumpSum: 'lump-sum',
|
|
59
|
+
/** Monthly, from pay, for whole years ending before the pension age. */
|
|
60
|
+
instalments: 'instalments',
|
|
61
|
+
};
|
|
62
|
+
/** Every instalment table. Looked up by the pension age and cover each
|
|
63
|
+
* carries, so a table can be found only by what it says it is. */
|
|
64
|
+
const INSTALMENT_TABLES = [
|
|
65
|
+
AP_0_712, AP_0_713, AP_0_714, AP_0_715,
|
|
66
|
+
AP_0_716, AP_0_717, AP_0_718, AP_0_719,
|
|
67
|
+
];
|
|
68
|
+
/** The first day both the tables and the limit hold for. */
|
|
69
|
+
const PRICED_FROM = AP_0_703.provenance.implemented > ADDITIONAL_PENSION_LIMIT.from
|
|
70
|
+
? AP_0_703.provenance.implemented
|
|
71
|
+
: ADDITIONAL_PENSION_LIMIT.from;
|
|
72
|
+
const refuse = (code, detail) => {
|
|
73
|
+
throw new AdditionalPensionUnavailable(ADDITIONAL_PENSION_REFUSALS[code], detail);
|
|
74
|
+
};
|
|
75
|
+
const roundToPenny = (pounds) => Math.round(pounds * 100) / 100;
|
|
76
|
+
/** The factor at an age and column, or the refusal naming what is
|
|
77
|
+
* missing. */
|
|
78
|
+
function priceAt(rows, firstAge, age, read, what) {
|
|
79
|
+
const row = rows[age - firstAge];
|
|
80
|
+
const value = row === undefined ? undefined : read(row);
|
|
81
|
+
return value ?? refuse('outsideTable', `${what} prints no price at age ${age}`);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The price of buying `annual` a year of additional pension, as a lump
|
|
85
|
+
* sum or monthly instalments, read from GAD's tables at the member's age
|
|
86
|
+
* last birthday on the date of election ("age when notice of election is
|
|
87
|
+
* given"). The instalment table is the one for the member's own Normal
|
|
88
|
+
* Pension Age, from their date of birth.
|
|
89
|
+
*
|
|
90
|
+
* Refused, by code: an amount off the £250 unit or over the limit, an
|
|
91
|
+
* election outside the dates the tables and the limit hold for, or an
|
|
92
|
+
* age or period the table does not print.
|
|
93
|
+
*/
|
|
94
|
+
export function additionalPensionCost(input) {
|
|
95
|
+
const { annual, cover, payment, election, dateOfBirth } = input;
|
|
96
|
+
const wholeUnits = annual > 0 && annual % ADDITIONAL_PENSION_UNIT === 0;
|
|
97
|
+
if (!wholeUnits) {
|
|
98
|
+
refuse('offUnit', `additional pension is bought in £`
|
|
99
|
+
+ `${ADDITIONAL_PENSION_UNIT} units, not £${annual}`);
|
|
100
|
+
}
|
|
101
|
+
if (annual > ADDITIONAL_PENSION_LIMIT.annual) {
|
|
102
|
+
refuse('overLimit', `£${annual} a year is over the `
|
|
103
|
+
+ `£${ADDITIONAL_PENSION_LIMIT.annual} limit`);
|
|
104
|
+
}
|
|
105
|
+
const outsidePricedDates = election < isoToDate(PRICED_FROM)
|
|
106
|
+
|| election >= isoToDate(ADDITIONAL_PENSION_LIMIT.until);
|
|
107
|
+
if (outsidePricedDates) {
|
|
108
|
+
refuse('outsideDates', `no tables and limit for an election on `
|
|
109
|
+
+ election.toDateString());
|
|
110
|
+
}
|
|
111
|
+
const units = annual / ADDITIONAL_PENSION_UNIT;
|
|
112
|
+
const age = periodInYearsMonths(dateOfBirth, election).years;
|
|
113
|
+
if (payment.kind === ADDITIONAL_PENSION_PAYMENTS.lumpSum) {
|
|
114
|
+
const factor = priceAt(AP_0_703.rows, AP_0_703.firstAge, age, (row) => row[cover], 'Table 0-703');
|
|
115
|
+
return { annual, cover, payment, cost: roundToPenny(units * factor),
|
|
116
|
+
table: AP_0_703.provenance };
|
|
117
|
+
}
|
|
118
|
+
invariant(Number.isInteger(payment.years) && payment.years >= 1, `instalments run for whole years, not ${payment.years}`);
|
|
119
|
+
const npa = normalPensionAge(dateOfBirth);
|
|
120
|
+
const table = INSTALMENT_TABLES.find((t) => t.npa === npa && t.cover === cover);
|
|
121
|
+
invariant(table !== undefined, `no instalment table for a Normal Pension Age of ${npa}`);
|
|
122
|
+
const factor = priceAt(table.rows, table.firstAge, age, (row) => row[payment.years - 1], `Table ${table.provenance.tableRef} over ${payment.years} years`);
|
|
123
|
+
return { annual, cover, payment, cost: roundToPenny(units * factor),
|
|
124
|
+
table: table.provenance };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* How much additional pension to buy now, a year, for `wanted` a year
|
|
128
|
+
* when it is drawn, in today's money, for a member paying in until they
|
|
129
|
+
* leave on the day they draw.
|
|
130
|
+
*
|
|
131
|
+
* Additional pension keeps pace with prices and no more: each Order's
|
|
132
|
+
* price change, with no 1.5 added, while in service (the "AP index
|
|
133
|
+
* adjustment", SI 2015/94 Sch 9 para 1) and in the leaving year (para
|
|
134
|
+
* 4). So in today's money it does not grow between the election and
|
|
135
|
+
* the drawing, where the rest of the 2015 pension gains 1.5% a year.
|
|
136
|
+
* Then the early or late factor for additional pension at the drawing.
|
|
137
|
+
* Rounded UP to whole £250 units: the smallest purchase that reaches
|
|
138
|
+
* the amount wanted.
|
|
139
|
+
*
|
|
140
|
+
* Refused: a member who leaves before drawing (deferred growth is not
|
|
141
|
+
* modelled), or a purchase over the limit.
|
|
142
|
+
*/
|
|
143
|
+
export function additionalPensionToBuy(input) {
|
|
144
|
+
const { wanted, dateOfBirth, election, leaving, drawing } = input;
|
|
145
|
+
invariant(wanted > 0, `wanted must be positive, not ${wanted}`);
|
|
146
|
+
invariant(drawing > election, 'the pension is drawn after it is bought');
|
|
147
|
+
const leavesBeforeDrawing = leaving.getTime() !== drawing.getTime();
|
|
148
|
+
if (leavesBeforeDrawing) {
|
|
149
|
+
refuse('leftBeforeDrawing', 'growth for a member who leaves before '
|
|
150
|
+
+ 'drawing is not modelled');
|
|
151
|
+
}
|
|
152
|
+
const growth = inflationFactor(drawing, election, TODAYS_MONEY_CPI);
|
|
153
|
+
const { factor } = factor2015(dateOfBirth, drawing, FACTOR_APPLIES.additionalPension);
|
|
154
|
+
const now = wanted / (growth * factor);
|
|
155
|
+
const annual = Math.ceil(now / ADDITIONAL_PENSION_UNIT)
|
|
156
|
+
* ADDITIONAL_PENSION_UNIT;
|
|
157
|
+
if (annual > ADDITIONAL_PENSION_LIMIT.annual) {
|
|
158
|
+
refuse('overLimit', `£${annual} a year would be needed, over the `
|
|
159
|
+
+ `£${ADDITIONAL_PENSION_LIMIT.annual} limit`);
|
|
160
|
+
}
|
|
161
|
+
return annual;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=additional-pension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"additional-pension.js","sourceRoot":"","sources":["../src/additional-pension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAC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M,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,uBAAuB,CAAC;UACnD,uBAAuB,CAAC;IAC5B,IAAI,MAAM,GAAG,wBAAwB,CAAC,MAAM,EAAE,CAAC;QAC7C,MAAM,CAAC,WAAW,EAAE,IAAI,MAAM,oCAAoC;cAC9D,IAAI,wBAAwB,CAAC,MAAM,QAAQ,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/dates.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calendar-date arithmetic. Package-private: consumed by
|
|
3
|
-
*
|
|
4
|
-
* root — consumers get scenario-level
|
|
2
|
+
* Calendar-date arithmetic. Package-private: consumed by the
|
|
3
|
+
* projection, the ledger and the uplift rule, deliberately not
|
|
4
|
+
* exported from the package root — consumers get scenario-level
|
|
5
|
+
* APIs, not date plumbing.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
+
* Three distinct period policies live here ON PURPOSE — do not
|
|
7
8
|
* unify them:
|
|
8
9
|
* - periodInYearsMonths: complete calendar months on the
|
|
9
10
|
* day-clamped anniversary convention (the UK
|
|
@@ -11,6 +12,9 @@
|
|
|
11
12
|
* factor lookups require.
|
|
12
13
|
* - yearsBetween: fractional 365.25-day years — what continuous
|
|
13
14
|
* compounding (revaluation, CPI deflation) requires.
|
|
15
|
+
* - monthsCountingPart: complete months with a part month of 16
|
|
16
|
+
* days or more counting as one — the scheme's count for a
|
|
17
|
+
* leaver's final year and the Treasury's for a first increase.
|
|
14
18
|
* Feeding one into the other's consumer corrupts results.
|
|
15
19
|
*
|
|
16
20
|
* The platform has no period/duration type; Temporal
|
|
@@ -18,22 +22,31 @@
|
|
|
18
22
|
* dev-only test oracle (tests/period-oracle.test.ts). Migrate to
|
|
19
23
|
* it when Node ships Temporal unflagged.
|
|
20
24
|
*/
|
|
25
|
+
/** Months in a year, and in a scheme year. */
|
|
26
|
+
export declare const MONTHS_PER_YEAR = 12;
|
|
21
27
|
/**
|
|
22
28
|
* Calculate the period between two dates in complete years and
|
|
23
29
|
* months plus remaining days, on the anniversary convention: a
|
|
24
30
|
* month completes on the day-clamped monthly anniversary of
|
|
25
31
|
* `from` (so 31 Jan → 28 Feb is one complete month). Requires
|
|
26
32
|
* two valid Dates and `from <= to`; the postcondition invariant
|
|
27
|
-
* guards the contract a calendar period must satisfy
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* downstream.
|
|
33
|
+
* guards the contract a calendar period must satisfy, because a
|
|
34
|
+
* period with negative days for a month-end date would silently
|
|
35
|
+
* defeat the ERF round-up downstream.
|
|
31
36
|
*/
|
|
32
37
|
export declare function periodInYearsMonths(from: Date, to: Date): {
|
|
33
38
|
years: number;
|
|
34
39
|
months: number;
|
|
35
40
|
days: number;
|
|
36
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Months from `from` to `to`, a part month of at least 16 days
|
|
44
|
+
* counting as one: the scheme's count for a leaver's final year and
|
|
45
|
+
* the Treasury's for a pension's first increase.
|
|
46
|
+
*/
|
|
47
|
+
export declare function monthsCountingPart(from: Date, to: Date): number;
|
|
48
|
+
/** The day after `date`: the end of a last day, as a period's end. */
|
|
49
|
+
export declare function dayAfter(date: Date): Date;
|
|
37
50
|
/** Fractional years between two dates, in 365.25-day years —
|
|
38
51
|
* for compounding, never for factor-table lookups (see the
|
|
39
52
|
* module header). */
|
package/dist/dates.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calendar-date arithmetic. Package-private: consumed by
|
|
3
|
-
*
|
|
4
|
-
* root — consumers get scenario-level
|
|
2
|
+
* Calendar-date arithmetic. Package-private: consumed by the
|
|
3
|
+
* projection, the ledger and the uplift rule, deliberately not
|
|
4
|
+
* exported from the package root — consumers get scenario-level
|
|
5
|
+
* APIs, not date plumbing.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
+
* Three distinct period policies live here ON PURPOSE — do not
|
|
7
8
|
* unify them:
|
|
8
9
|
* - periodInYearsMonths: complete calendar months on the
|
|
9
10
|
* day-clamped anniversary convention (the UK
|
|
@@ -11,6 +12,9 @@
|
|
|
11
12
|
* factor lookups require.
|
|
12
13
|
* - yearsBetween: fractional 365.25-day years — what continuous
|
|
13
14
|
* compounding (revaluation, CPI deflation) requires.
|
|
15
|
+
* - monthsCountingPart: complete months with a part month of 16
|
|
16
|
+
* days or more counting as one — the scheme's count for a
|
|
17
|
+
* leaver's final year and the Treasury's for a first increase.
|
|
14
18
|
* Feeding one into the other's consumer corrupts results.
|
|
15
19
|
*
|
|
16
20
|
* The platform has no period/duration type; Temporal
|
|
@@ -19,24 +23,26 @@
|
|
|
19
23
|
* it when Node ships Temporal unflagged.
|
|
20
24
|
*/
|
|
21
25
|
import { invariant } from './errors.js';
|
|
26
|
+
/** Months in a year, and in a scheme year. */
|
|
27
|
+
export const MONTHS_PER_YEAR = 12;
|
|
22
28
|
const MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
23
29
|
const MS_PER_YEAR = 365.25 * MS_PER_DAY;
|
|
24
|
-
/**
|
|
25
|
-
* month
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Days a part month must reach to count as a whole one: SI 2015/94
|
|
32
|
+
* Sch 9 para 3(3) counts "an incomplete month that consists of at
|
|
33
|
+
* least 16 days" as complete, and HM Treasury's Pensions Increase
|
|
34
|
+
* tables band a pension's first increase the same way.
|
|
35
|
+
*/
|
|
36
|
+
const PART_MONTH_COUNTS_AT_DAYS = 16;
|
|
30
37
|
/**
|
|
31
38
|
* Calculate the period between two dates in complete years and
|
|
32
39
|
* months plus remaining days, on the anniversary convention: a
|
|
33
40
|
* month completes on the day-clamped monthly anniversary of
|
|
34
41
|
* `from` (so 31 Jan → 28 Feb is one complete month). Requires
|
|
35
42
|
* two valid Dates and `from <= to`; the postcondition invariant
|
|
36
|
-
* guards the contract a calendar period must satisfy
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* downstream.
|
|
43
|
+
* guards the contract a calendar period must satisfy, because a
|
|
44
|
+
* period with negative days for a month-end date would silently
|
|
45
|
+
* defeat the ERF round-up downstream.
|
|
40
46
|
*/
|
|
41
47
|
export function periodInYearsMonths(from, to) {
|
|
42
48
|
/* Checked before any arithmetic, and neither date is named by
|
|
@@ -50,7 +56,7 @@ export function periodInYearsMonths(from, to) {
|
|
|
50
56
|
nothing below can mint one. */
|
|
51
57
|
invariant(!Number.isNaN(from.getTime()), 'periodInYearsMonths: invalid from');
|
|
52
58
|
invariant(!Number.isNaN(to.getTime()), 'periodInYearsMonths: invalid to');
|
|
53
|
-
let totalMonths = (to.getFullYear() - from.getFullYear()) *
|
|
59
|
+
let totalMonths = (to.getFullYear() - from.getFullYear()) * MONTHS_PER_YEAR
|
|
54
60
|
+ (to.getMonth() - from.getMonth());
|
|
55
61
|
if (addMonthsClamped(from, totalMonths) > to) {
|
|
56
62
|
totalMonths -= 1;
|
|
@@ -58,14 +64,30 @@ export function periodInYearsMonths(from, to) {
|
|
|
58
64
|
const anniversary = addMonthsClamped(from, totalMonths);
|
|
59
65
|
// Round absorbs the ±1h a DST boundary shifts local midnight.
|
|
60
66
|
const days = Math.round((to.getTime() - anniversary.getTime()) / MS_PER_DAY);
|
|
61
|
-
const years = Math.floor(totalMonths /
|
|
62
|
-
const months = totalMonths %
|
|
63
|
-
invariant(years >= 0 && months >= 0 && months <
|
|
67
|
+
const years = Math.floor(totalMonths / MONTHS_PER_YEAR);
|
|
68
|
+
const months = totalMonths % MONTHS_PER_YEAR;
|
|
69
|
+
invariant(years >= 0 && months >= 0 && months < MONTHS_PER_YEAR
|
|
64
70
|
&& days >= 0 && days <= 31, `periodInYearsMonths produced an invalid period `
|
|
65
71
|
+ `${years}yr ${months}mo ${days}d for `
|
|
66
72
|
+ `${from.toISOString()} → ${to.toISOString()}`);
|
|
67
73
|
return { years, months, days };
|
|
68
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Months from `from` to `to`, a part month of at least 16 days
|
|
77
|
+
* counting as one: the scheme's count for a leaver's final year and
|
|
78
|
+
* the Treasury's for a pension's first increase.
|
|
79
|
+
*/
|
|
80
|
+
export function monthsCountingPart(from, to) {
|
|
81
|
+
if (to <= from)
|
|
82
|
+
return 0;
|
|
83
|
+
const { years, months, days } = periodInYearsMonths(from, to);
|
|
84
|
+
const partCounts = days >= PART_MONTH_COUNTS_AT_DAYS;
|
|
85
|
+
return years * MONTHS_PER_YEAR + months + (partCounts ? 1 : 0);
|
|
86
|
+
}
|
|
87
|
+
/** The day after `date`: the end of a last day, as a period's end. */
|
|
88
|
+
export function dayAfter(date) {
|
|
89
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1);
|
|
90
|
+
}
|
|
69
91
|
/** Fractional years between two dates, in 365.25-day years —
|
|
70
92
|
* for compounding, never for factor-table lookups (see the
|
|
71
93
|
* module header). */
|
|
@@ -87,4 +109,10 @@ export function npaDate(dateOfBirth, npa) {
|
|
|
87
109
|
export function earliest(...dates) {
|
|
88
110
|
return new Date(Math.min(...dates.map((d) => d.getTime())));
|
|
89
111
|
}
|
|
112
|
+
/** `date` plus `n` months, day-of-month clamped to the target
|
|
113
|
+
* month's length (31 Jan + 1mo = 28 Feb). */
|
|
114
|
+
function addMonthsClamped(date, n) {
|
|
115
|
+
const lastDay = new Date(date.getFullYear(), date.getMonth() + n + 1, 0).getDate();
|
|
116
|
+
return new Date(date.getFullYear(), date.getMonth() + n, Math.min(date.getDate(), lastDay));
|
|
117
|
+
}
|
|
90
118
|
//# sourceMappingURL=dates.js.map
|
package/dist/dates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates.js","sourceRoot":"","sources":["../src/dates.ts"],"names":[],"mappings":"AAAA
|
|
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;AACvD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CACrB,WAAiB,EACjB,GAAW;IAEX,OAAO,IAAI,IAAI,CACb,WAAW,CAAC,WAAW,EAAE,GAAG,GAAG,EAC/B,WAAW,CAAC,QAAQ,EAAE,EACtB,WAAW,CAAC,OAAO,EAAE,CACtB,CAAC;AACJ,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,QAAQ,CAAC,GAAG,KAAsB;IAChD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;6CAC6C;AAC7C,SAAS,gBAAgB,CAAC,IAAU,EAAE,CAAS;IAC7C,MAAM,OAAO,GAAG,IAAI,IAAI,CACtB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,EACvB,CAAC,CACF,CAAC,OAAO,EAAE,CAAC;IACZ,OAAO,IAAI,IAAI,CACb,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAClC,CAAC;AACJ,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -157,4 +157,30 @@ export declare class BenefitNotModelled extends Error {
|
|
|
157
157
|
readonly code: NotModelled;
|
|
158
158
|
constructor(code: NotModelled, detail: string);
|
|
159
159
|
}
|
|
160
|
+
/** Why an additional pension purchase is refused, as a closed set a
|
|
161
|
+
* consumer can branch on. */
|
|
162
|
+
export declare const ADDITIONAL_PENSION_REFUSALS: {
|
|
163
|
+
/** Not a whole number of £250 units. */
|
|
164
|
+
readonly offUnit: "off-unit";
|
|
165
|
+
/** More than the limit a member may buy. */
|
|
166
|
+
readonly overLimit: "over-limit";
|
|
167
|
+
/** An age or payment period the table does not print. */
|
|
168
|
+
readonly outsideTable: "outside-table";
|
|
169
|
+
/** An election outside the dates the tables and the limit hold for. */
|
|
170
|
+
readonly outsideDates: "outside-dates";
|
|
171
|
+
/** A member who leaves before drawing: deferred growth is not
|
|
172
|
+
* modelled. */
|
|
173
|
+
readonly leftBeforeDrawing: "left-before-drawing";
|
|
174
|
+
};
|
|
175
|
+
export type AdditionalPensionRefusal = (typeof ADDITIONAL_PENSION_REFUSALS)[keyof typeof ADDITIONAL_PENSION_REFUSALS];
|
|
176
|
+
/**
|
|
177
|
+
* An additional pension purchase the published tables do not price, or
|
|
178
|
+
* the scheme's rules do not allow. Refused rather than extrapolated,
|
|
179
|
+
* because an extrapolated factor is a price nobody has published; `code`
|
|
180
|
+
* says which, so a consumer can tell a member what to change.
|
|
181
|
+
*/
|
|
182
|
+
export declare class AdditionalPensionUnavailable extends Error {
|
|
183
|
+
readonly code: AdditionalPensionRefusal;
|
|
184
|
+
constructor(code: AdditionalPensionRefusal, detail: string);
|
|
185
|
+
}
|
|
160
186
|
export {};
|
package/dist/errors.js
CHANGED
|
@@ -208,4 +208,33 @@ export class BenefitNotModelled extends Error {
|
|
|
208
208
|
this.name = 'BenefitNotModelled';
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
+
/** Why an additional pension purchase is refused, as a closed set a
|
|
212
|
+
* consumer can branch on. */
|
|
213
|
+
export const ADDITIONAL_PENSION_REFUSALS = {
|
|
214
|
+
/** Not a whole number of £250 units. */
|
|
215
|
+
offUnit: 'off-unit',
|
|
216
|
+
/** More than the limit a member may buy. */
|
|
217
|
+
overLimit: 'over-limit',
|
|
218
|
+
/** An age or payment period the table does not print. */
|
|
219
|
+
outsideTable: 'outside-table',
|
|
220
|
+
/** An election outside the dates the tables and the limit hold for. */
|
|
221
|
+
outsideDates: 'outside-dates',
|
|
222
|
+
/** A member who leaves before drawing: deferred growth is not
|
|
223
|
+
* modelled. */
|
|
224
|
+
leftBeforeDrawing: 'left-before-drawing',
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* An additional pension purchase the published tables do not price, or
|
|
228
|
+
* the scheme's rules do not allow. Refused rather than extrapolated,
|
|
229
|
+
* because an extrapolated factor is a price nobody has published; `code`
|
|
230
|
+
* says which, so a consumer can tell a member what to change.
|
|
231
|
+
*/
|
|
232
|
+
export class AdditionalPensionUnavailable extends Error {
|
|
233
|
+
code;
|
|
234
|
+
constructor(code, detail) {
|
|
235
|
+
super(`No additional pension price: ${detail}`);
|
|
236
|
+
this.code = code;
|
|
237
|
+
this.name = 'AdditionalPensionUnavailable';
|
|
238
|
+
}
|
|
239
|
+
}
|
|
211
240
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAeH;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,SAAkB,EAClB,OAAe;IAEf,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAE9B;IAIA;IACA;IAEA;IARX,YACW,MAAc;IACvB;;8CAE0C;IACjC,IAAa,EACb,OAAgB;IACzB,6DAA6D;IACpD,UAAmB;QAE5B,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;QAT9C,WAAM,GAAN,MAAM,CAAQ;QAId,SAAI,GAAJ,IAAI,CAAS;QACb,YAAO,GAAP,OAAO,CAAS;QAEhB,eAAU,GAAV,UAAU,CAAS;QAG5B,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AA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