diff --git a/src/lib/situations.ts b/src/lib/situations.ts index de6fb3218f4936b82a4ae24575bf134098fdc297..9beaef7354b4b469243910e08bc2efb8f16d0060 100644 --- a/src/lib/situations.ts +++ b/src/lib/situations.ts @@ -303,9 +303,13 @@ export function setSituationVariableValue( ) { return false } - valueByPeriod[year - 2] = value - valueByPeriod[year - 1] = value - valueByPeriod[year] = value + if ((variable.name = "date_naissance")) { + valueByPeriod[year] = value + } else { + valueByPeriod[year - 2] = value + valueByPeriod[year - 1] = value + valueByPeriod[year] = value + } return true }