@casomoltd/nhs-pay 0.29.0 → 0.30.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.
@@ -1,12 +1,113 @@
1
+ /**
2
+ * The final-salary engine the 1995 and 2008 Sections share. What
3
+ * differs between them is statute — the denominator, the pay measure,
4
+ * the lump sum, which factors apply — and each section holds its own
5
+ * rules privately, so no caller can compose a combination the scheme
6
+ * lacks, such as a 60 denominator on best-single-year pay.
7
+ */
8
+ import { dayAfter, daysBetween } from '../dates.js';
1
9
  import { moneyAt } from '../pension/money.js';
2
- import { schemeYearEndFor } from '../pension/seed.js';
10
+ import { schemeYearEndFor, schemeYearStartDate } from '../pension/seed.js';
3
11
  /** How a section measures final pay, named for an award's provenance.
4
12
  * The measuring itself is each section's own `finalPay`. */
5
13
  export const PAY_MEASURES = {
6
14
  bestSingleOf3: 'best-single-of-3',
7
15
  meanOf3ConsecutiveIn10: 'mean-of-3-consecutive-in-10',
8
16
  };
9
- const MS_PER_DAY = 24 * 60 * 60 * 1000;
17
+ /** The years the 1995 Section's best single year is chosen from: the
18
+ * last three. */
19
+ const BEST_SINGLE_OF_YEARS = 3;
20
+ /** The consecutive years the 2008 Section's measure averages. */
21
+ const CONSECUTIVE_YEARS = 3;
22
+ /** The last years those consecutive years must fall inside. */
23
+ const CONSECUTIVE_WITHIN_YEARS = 10;
24
+ /** The divisor for membership's odd days: see `membershipYears`. */
25
+ const DAYS_PER_MEMBERSHIP_YEAR = 365;
26
+ /**
27
+ * Value final-salary membership at a drawing.
28
+ *
29
+ * The pension is measured once, on the pay at leaving — final salary
30
+ * linkage: membership may have frozen years earlier, but the pay
31
+ * measure did not. In today's money that is the figure; in cash it is
32
+ * the same figure carried to the drawing date at the assumption, since
33
+ * pay and a deferred legacy pension both move with prices.
34
+ */
35
+ export function finalSalaryBenefit(rules, { windows, payPath, dateOfBirth, leaving, drawing, prices }) {
36
+ const { membership, finalPay: pay, pension: unreduced, automaticLumpSum: unreducedLump, } = unreducedPension(rules, windows, payPath, leaving);
37
+ const pensionFactor = rules.pensionFactor(dateOfBirth, leaving, drawing);
38
+ const lump = rules.automaticLumpSum;
39
+ const lumpFactor = lump === null
40
+ ? null
41
+ : lump.factor(dateOfBirth, leaving, drawing);
42
+ const lumpSum = lumpFactor === null ? 0 : unreducedLump * lumpFactor.factor;
43
+ const money = (real) => moneyAt({ real, nominal: prices.payAt(real, drawing) }, drawing);
44
+ return {
45
+ pensionBeforeFactor: money(unreduced),
46
+ pension: money(unreduced * pensionFactor.factor),
47
+ automaticLumpSum: money(lumpSum),
48
+ automaticLumpSumBeforeFactor: money(unreducedLump),
49
+ pensionFactor,
50
+ automaticLumpSumFactor: lumpFactor,
51
+ membership,
52
+ finalPay: pay,
53
+ };
54
+ }
55
+ /**
56
+ * A final-salary pension before any factor, in today's money: the
57
+ * membership, over the denominator, times final pay measured back from
58
+ * `leaving`. The one place the formula is written, so the pension
59
+ * held today and the pension drawn cannot come to disagree.
60
+ */
61
+ export function unreducedPension(rules, windows, payPath, leaving) {
62
+ const membership = membershipYears(windows);
63
+ const pay = rules.finalPay(payPath, leaving);
64
+ const pension = (membership / rules.denominator) * pay;
65
+ return {
66
+ membership,
67
+ finalPay: pay,
68
+ pension,
69
+ automaticLumpSum: (rules.automaticLumpSum?.multiple ?? 0) * pension,
70
+ };
71
+ }
72
+ /**
73
+ * The 1995 Section's measure: the best single year of the last three,
74
+ * each year the 12 months ending on a leaving anniversary. SI 1995/300
75
+ * reg C1(6): "final year's pensionable pay" is "pensionable pay in
76
+ * respect of the member's last year of pensionable employment, ending on
77
+ * the date the member ceases to be in such employment", unless "pensionable
78
+ * pay was greater in either or both of the 2 consecutive years immediately
79
+ * preceding the last year".
80
+ */
81
+ export function bestSingleOf3(payPath, leaving) {
82
+ return Math.max(...yearsTo(payPath, leaving, BEST_SINGLE_OF_YEARS));
83
+ }
84
+ /**
85
+ * The 2008 Section's measure: the best average of three consecutive
86
+ * years in the last ten, measured back from leaving, each "revalued to
87
+ * current terms", which a path already in today's money is. SI 2008/653
88
+ * reg 2.A.10(5)(b) compares "the period of 1095 days immediately
89
+ * preceding the relevant day (Period 1)", then "the period of 1095 days
90
+ * which overlaps Period 1 by 730 days (Period 2)", "and so on", and
91
+ * 2.A.10(6) takes the one that begins "within the period of 10 years
92
+ * ending with the relevant day" with the highest pay; for a leaver,
93
+ * 2.A.10(5)(a)(i) makes the relevant day "the day on which the member's
94
+ * active membership ceases". The short-service rule of 2.A.10(7), for
95
+ * under 1095 days' service in the ten years, is not modelled: it moves
96
+ * only a member with less than three years' service before leaving.
97
+ */
98
+ export function meanOf3ConsecutiveIn10(payPath, leaving) {
99
+ // Three consecutive years starting inside the last ten can begin at any
100
+ // of the eight latest offsets back from leaving.
101
+ const windowsInside = CONSECUTIVE_WITHIN_YEARS - CONSECUTIVE_YEARS + 1;
102
+ const years = yearsTo(payPath, leaving, CONSECUTIVE_WITHIN_YEARS);
103
+ let best = 0;
104
+ for (let back = 0; back < windowsInside; back++) {
105
+ const sum = years.slice(back, back + CONSECUTIVE_YEARS)
106
+ .reduce((a, b) => a + b, 0);
107
+ best = Math.max(best, sum / CONSECUTIVE_YEARS);
108
+ }
109
+ return best;
110
+ }
10
111
  /**
11
112
  * Membership in years: whole years from the first day, then the days
12
113
  * left over as a fraction of 365. The legacy sections count
@@ -20,81 +121,38 @@ const MS_PER_DAY = 24 * 60 * 60 * 1000;
20
121
  function membershipYears(windows) {
21
122
  let total = 0;
22
123
  for (const { from, to } of windows) {
23
- const end = new Date(to.getFullYear(), to.getMonth(), to.getDate() + 1);
124
+ const end = dayAfter(to);
24
125
  let years = end.getFullYear() - from.getFullYear();
25
126
  const anniversary = (n) => new Date(from.getFullYear() + n, from.getMonth(), from.getDate());
26
127
  if (anniversary(years) > end)
27
128
  years -= 1;
28
- const days = Math.round((end.getTime() - anniversary(years).getTime()) / MS_PER_DAY);
29
- total += years + days / 365;
129
+ const days = daysBetween(anniversary(years), end);
130
+ total += years + days / DAYS_PER_MEMBERSHIP_YEAR;
30
131
  }
31
132
  return total;
32
133
  }
33
- /** Each year's pay on the path, in today's money. */
34
- const payIn = (payPath, year) => payPath.payFor(year).pay;
35
- /** The 1995 Section's measure: the best single year of the last
36
- * three. */
37
- export function bestSingleOf3(payPath, lastYear) {
38
- return Math.max(payIn(payPath, lastYear), payIn(payPath, lastYear - 1), payIn(payPath, lastYear - 2));
39
- }
40
- /** The 2008 Section's measure: the best average of three consecutive
41
- * years in the last ten, each "revalued to current terms", which a
42
- * path already in today's money is. */
43
- export function meanOf3ConsecutiveIn10(payPath, lastYear) {
44
- // Three consecutive years inside the last ten can end in any of the
45
- // last eight: the eighth-last is the latest window that still starts
46
- // inside the ten.
47
- const WINDOWS_IN_TEN = 10 - 3 + 1;
48
- let best = 0;
49
- for (let end = lastYear; end > lastYear - WINDOWS_IN_TEN; end--) {
50
- const mean = (payIn(payPath, end) + payIn(payPath, end - 1)
51
- + payIn(payPath, end - 2)) / 3;
52
- best = Math.max(best, mean);
53
- }
54
- return best;
55
- }
56
- /**
57
- * A final-salary pension before any factor, in today's money: the
58
- * membership, over the denominator, times final pay measured at
59
- * `lastYear`. The one place the formula is written, so the pension
60
- * held today and the pension drawn cannot come to disagree.
61
- */
62
- export function unreducedPension(rules, windows, payPath, lastYear) {
63
- const membership = membershipYears(windows);
64
- const pay = rules.finalPay(payPath, lastYear);
65
- const pension = (membership / rules.denominator) * pay;
66
- return {
67
- membership,
68
- finalPay: pay,
69
- pension,
70
- automaticLumpSum: (rules.automaticLumpSum?.multiple ?? 0) * pension,
71
- };
72
- }
73
134
  /**
74
- * Value final-salary membership at a drawing.
75
- *
76
- * The pension is measured once, on the pay at leaving — final salary
77
- * linkage: membership may have frozen years earlier, but the pay
78
- * measure did not. In today's money that is the figure; in cash it is
79
- * the same figure carried to the drawing date at the assumption, since
80
- * pay and a deferred legacy pension both move with prices.
135
+ * The pay of the `count` years of 12 months ending on `leaving`, then on
136
+ * each anniversary before it, latest first, in today's money. Both
137
+ * regulations measure from the leaving date, while the path holds pay by
138
+ * scheme year (1 April to 31 March), so each measured year takes the
139
+ * share of the scheme year it ends in that has run by the leaving date
140
+ * and the rest from the scheme year before, pay being even across a
141
+ * year. The share counts the scheme year's own days, 365 or 366, so a
142
+ * leaving on 31 March takes that scheme year whole and the year before
143
+ * is not read at all. Two parts are this library's reading, each at most
144
+ * a day in a year: anniversary years where 2.A.10 counts 1095-day
145
+ * periods, and one share, from the leaving year, for every year back.
81
146
  */
82
- export function finalSalaryBenefit(rules, { windows, payPath, dateOfBirth, leaving, drawing, prices }) {
83
- const { membership, finalPay: pay, pension: unreduced, automaticLumpSum: unreducedLump, } = unreducedPension(rules, windows, payPath, schemeYearEndFor(leaving));
84
- const factor = rules.pensionFactor(dateOfBirth, leaving, drawing);
85
- const lump = rules.automaticLumpSum;
86
- const lumpSum = lump === null
87
- ? 0
88
- : unreducedLump * lump.factor(dateOfBirth, leaving, drawing).factor;
89
- const money = (real) => moneyAt({ real, nominal: prices.payAt(real, drawing) }, drawing);
90
- return {
91
- beforeFactor: money(unreduced),
92
- pension: money(unreduced * factor.factor),
93
- automaticLumpSum: money(lumpSum),
94
- automaticLumpSumBeforeFactor: money(unreducedLump),
95
- factor,
96
- membership,
97
- finalPay: pay,
98
- };
147
+ function yearsTo(payPath, leaving, count) {
148
+ const last = schemeYearEndFor(leaving);
149
+ const opened = schemeYearStartDate(last);
150
+ const daysIn = daysBetween(opened, schemeYearStartDate(last + 1));
151
+ const share = (daysBetween(opened, leaving) + 1) / daysIn;
152
+ const pay = (year) => payPath.payFor(year).pay;
153
+ const leftOnYearEnd = share === 1;
154
+ return Array.from({ length: count }, (_, back) => (leftOnYearEnd
155
+ ? pay(last - back)
156
+ : share * pay(last - back) + (1 - share) * pay(last - back - 1)));
99
157
  }
100
158
  //# sourceMappingURL=final-salary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"final-salary.js","sourceRoot":"","sources":["../../src/sections/final-salary.ts"],"names":[],"m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AK,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casomoltd/nhs-pay",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "NHS pay scales and take-home pay, and a member's NHS pension across the 1995, 2008 and 2015 Sections",
5
5
  "homepage": "https://casomo.co.uk",
6
6
  "bugs": "https://github.com/casomoltd/nhs-pay/issues",
@@ -67,10 +67,10 @@
67
67
  "provenance": true
68
68
  },
69
69
  "peerDependencies": {
70
- "@casomoltd/paye-calc": ">=0.12.0"
70
+ "@casomoltd/paye-calc": ">=0.14.0"
71
71
  },
72
72
  "devDependencies": {
73
- "@casomoltd/paye-calc": "^0.12.0",
73
+ "@casomoltd/paye-calc": "^0.14.0",
74
74
  "@casomoltd/tooling": "^0.37.0",
75
75
  "@commitlint/cli": "^20.0.0",
76
76
  "@js-temporal/polyfill": "^0.5.1",