From 6e24afbea5169504c53b39db5bcea25cbdc3543c Mon Sep 17 00:00:00 2001 From: MarcoGoC Date: Fri, 6 Dec 2024 15:10:37 -0500 Subject: [PATCH] removing months from the age --- utils/api/helpers/utils.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/api/helpers/utils.ts b/utils/api/helpers/utils.ts index 8b75ea2fa..af745b13a 100644 --- a/utils/api/helpers/utils.ts +++ b/utils/api/helpers/utils.ts @@ -220,6 +220,13 @@ export function OasEligibility( yearsInCanada++ } + // If client is n years + months. #219890 + // the oas should be 65 exactly not 65 plus months + age = + age > minAgeEligibility && age < minAgeEligibility + 1 + ? Math.floor(age) + : age + ageOfEligibility = yearsInCanadaAtStart < minYearsOfResEligibility ? age : Math.floor(age) @@ -269,6 +276,7 @@ export function evaluateOASInput(input) { const age = input.age // 66.42 const ageJuly2013 = calculate2013Age(age, input.clientBirthDate) const yearsInCanada = input.yearsInCanadaSince18 + let eliObj = OasEligibility( age, yearsInCanada,