@casomoltd/nhs-pay 0.25.0 → 0.27.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/dist/additional-pension.js +1 -1
- package/dist/additional-pension.js.map +1 -1
- package/dist/factor-basis.d.ts +1 -10
- package/dist/factor-basis.js +1 -10
- package/dist/factor-basis.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/member-benefits.js +1 -1
- package/dist/member-benefits.js.map +1 -1
- package/dist/pension/ages.d.ts +72 -0
- package/dist/pension/ages.js +110 -0
- package/dist/pension/ages.js.map +1 -0
- package/dist/post.d.ts +10 -1
- package/dist/post.js +17 -2
- package/dist/post.js.map +1 -1
- package/dist/scales.d.ts +8 -17
- package/dist/scales.js +11 -20
- package/dist/scales.js.map +1 -1
- package/dist/sections/section-1995.js +2 -1
- package/dist/sections/section-1995.js.map +1 -1
- package/dist/sections/section-2008.js +2 -1
- package/dist/sections/section-2008.js.map +1 -1
- package/dist/sections/section-2015.js +1 -1
- package/dist/sections/section-2015.js.map +1 -1
- package/dist/sources.d.ts +7 -2
- package/dist/sources.js +13 -3
- package/dist/sources.js.map +1 -1
- package/dist/take-home.d.ts +16 -1
- package/dist/take-home.js +41 -22
- package/dist/take-home.js.map +1 -1
- package/dist/working-week.d.ts +0 -2
- package/dist/working-week.js +1 -1
- package/dist/working-week.js.map +1 -1
- package/package.json +3 -3
- package/dist/npa.d.ts +0 -28
- package/dist/npa.js +0 -60
- package/dist/npa.js.map +0 -1
package/dist/npa.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NHS 2015 scheme normal pension age.
|
|
3
|
-
*
|
|
4
|
-
* NPA = the member's State Pension age, with a floor of 65
|
|
5
|
-
* (NHSBSA 2015 Members' Guide V13, May 2024). The SPA timetable
|
|
6
|
-
* is legislated — Pensions Acts 1995/2007/2011/2014 — and
|
|
7
|
-
* reproduced in gov.uk's "State Pension age timetable"
|
|
8
|
-
* (last updated 15 May 2014; the legislated dates have not
|
|
9
|
-
* changed since — the 2023 SPA review left them as enacted).
|
|
10
|
-
*
|
|
11
|
-
* Whole years only. The Acts phase each rise through narrow
|
|
12
|
-
* transitional birth cohorts whose exact SPA is 65/66/67 plus
|
|
13
|
-
* some months; this function returns the NEXT whole year for
|
|
14
|
-
* those cohorts (66/67/68). Rounding up is member-conservative,
|
|
15
|
-
* in the same spirit as the ERF part-month round-up (GAD 2019
|
|
16
|
-
* guidance §2.3): a projection anchored on the later NPA can
|
|
17
|
-
* understate early-retirement pension by a few months' factor,
|
|
18
|
-
* never overstate it. Callers needing month-exact SPA for the
|
|
19
|
-
* transitional cohorts need the per-cohort tables in the Acts,
|
|
20
|
-
* which this library deliberately does not transcribe.
|
|
21
|
-
*/
|
|
22
|
-
import { invariant } from './errors.js';
|
|
23
|
-
/**
|
|
24
|
-
* 2015 scheme floor (Members' Guide V13). Everyone born before
|
|
25
|
-
* the first band below has SPA ≤ 65 (women's pre-equalisation
|
|
26
|
-
* SPA was lower still), so the floor is their NPA.
|
|
27
|
-
*/
|
|
28
|
-
const NPA_FLOOR = 65;
|
|
29
|
-
/**
|
|
30
|
-
* Each band starts where the timetable first exceeds the
|
|
31
|
-
* previous whole year; the value is that rise's target age.
|
|
32
|
-
* Boundaries are dates of birth from gov.uk's timetable:
|
|
33
|
-
* - 6 Dec 1953 — first cohort with SPA above 65
|
|
34
|
-
* (Pensions Act 2011; phased to 6 Oct 1954, then exactly 66)
|
|
35
|
-
* - 6 Apr 1960 — first cohort above 66, "66 years and 1 month"
|
|
36
|
-
* (Pensions Act 2014; phased to 5 Mar 1961, then exactly 67)
|
|
37
|
-
* - 6 Apr 1977 — first cohort above 67
|
|
38
|
-
* (Pensions Act 2007; phased to 5 Apr 1978, then exactly 68)
|
|
39
|
-
*/
|
|
40
|
-
const SPA_BANDS = [
|
|
41
|
-
{ from: new Date(1953, 11, 6), npa: 66 },
|
|
42
|
-
{ from: new Date(1960, 3, 6), npa: 67 },
|
|
43
|
-
{ from: new Date(1977, 3, 6), npa: 68 },
|
|
44
|
-
];
|
|
45
|
-
/**
|
|
46
|
-
* Normal pension age for a 2015-scheme member born on
|
|
47
|
-
* `dateOfBirth`, in whole years (see the module header for the
|
|
48
|
-
* transitional-cohort rounding). The result is what
|
|
49
|
-
* `projectPension` expects as its `npa` input.
|
|
50
|
-
*/
|
|
51
|
-
export function normalPensionAge(dateOfBirth) {
|
|
52
|
-
invariant(!Number.isNaN(dateOfBirth.getTime()), 'normalPensionAge: invalid dateOfBirth');
|
|
53
|
-
let npa = NPA_FLOOR;
|
|
54
|
-
for (const band of SPA_BANDS) {
|
|
55
|
-
if (dateOfBirth >= band.from)
|
|
56
|
-
npa = band.npa;
|
|
57
|
-
}
|
|
58
|
-
return npa;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=npa.js.map
|
package/dist/npa.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"npa.js","sourceRoot":"","sources":["../src/npa.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;GAIG;AACH,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;;;;;;GAUG;AACH,MAAM,SAAS,GAAG;IAChB,EAAC,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAC;IACtC,EAAC,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAC;IACrC,EAAC,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAC;CAC7B,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAiB;IAChD,SAAS,CACP,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EACpC,uCAAuC,CACxC,CAAC;IACF,IAAI,GAAG,GAAG,SAAS,CAAC;IACpB,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,IAAI,WAAW,IAAI,IAAI,CAAC,IAAI;YAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAC/C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|