You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really enjoy OpenFisca, but I recently encountered an issue.
Here is what I did:
I sent a request to Openfisca asking for the "age" of multiple individuals by sending their "date_naissance" on an "eternity" period.
Here is what I expected to happen:
I expected the individuals' age to be calculated from their date_naissance.
Here is what actually happened:
For all the individuals except the last one, their age was instead calculated as if "date_naissance" had its default value instead of the one in the request.
After some investigation, it appears that the problem with "eternity" was one of case : "eternity" doesn't work, but "ETERNITY" does. It would be ideal if the engine ignored the case of "eternity" in this case.
This same error also happens if one of the individuals send their "date_naissance" on a month/year period whereas the others send it on ETERNITY, in which case the individual in question will have everything calculated as if its date_naissance had the default value.
Here is data (or links to it) that can help you reproduce this issue:
- name: All 3 individuals use the "eternity" (lower case, specifically) period for their date_naissance period: 2024-11 relative_error_margin: 0.01 input: individus: parent1: date_naissance: eternity: 2000-10-15 parent2: date_naissance: eternity: 1990-10-15 parent3: date_naissance: eternity: 1980-10-15 output: individus: parent1: date_naissance: 2024-11: 1970-01-01 age: 2024-11: 54 parent2: date_naissance: 2024-11: 1970-01-01 age: 2024-11: 54 parent3: date_naissance: 2024-11: 1980-10-15 age: 2024-11: 44
- name: All 3 individuals use the "ETERNITY" period for their date_naissance period: 2024-11 relative_error_margin: 0.01 input: individus: parent1: date_naissance: ETERNITY: 2000-10-15 parent2: date_naissance: ETERNITY: 1990-10-15 parent3: date_naissance: ETERNITY: 1980-10-15 output: individus: parent1: date_naissance: 2024-11: 2000-10-15 age: 2024-11: 24 parent2: date_naissance: 2024-11: 1990-10-15 age: 2024-11: 34 parent3: date_naissance: 2024-11: 1980-10-15 age: 2024-11: 44
- name: One of the 3 individuals use a month as the period for their date_naissance period: 2024-11 relative_error_margin: 0.01 input: individus: parent1: date_naissance: ETERNITY: 2000-10-15 parent2: date_naissance: 2024-11: 1990-10-15 parent3: date_naissance: ETERNITY: 1980-10-15 output: individus: parent1: date_naissance: 2024-11: 2000-10-15 age: 2024-11: 24 parent2: date_naissance: 2024-11: 1970-01-01 age: 2024-11: 54 parent3: date_naissance: 2024-11: 1980-10-15 age: 2024-11: 44
Context
I identify more as a:
Developer.
The text was updated successfully, but these errors were encountered:
Hi there!
I really enjoy OpenFisca, but I recently encountered an issue.
Here is what I did:
I sent a request to Openfisca asking for the "age" of multiple individuals by sending their "date_naissance" on an "eternity" period.
Here is what I expected to happen:
I expected the individuals' age to be calculated from their date_naissance.
Here is what actually happened:
For all the individuals except the last one, their age was instead calculated as if "date_naissance" had its default value instead of the one in the request.
After some investigation, it appears that the problem with "eternity" was one of case : "eternity" doesn't work, but "ETERNITY" does. It would be ideal if the engine ignored the case of "eternity" in this case.
This same error also happens if one of the individuals send their "date_naissance" on a month/year period whereas the others send it on ETERNITY, in which case the individual in question will have everything calculated as if its date_naissance had the default value.
Here is data (or links to it) that can help you reproduce this issue:
- name: All 3 individuals use the "eternity" (lower case, specifically) period for their date_naissance period: 2024-11 relative_error_margin: 0.01 input: individus: parent1: date_naissance: eternity: 2000-10-15 parent2: date_naissance: eternity: 1990-10-15 parent3: date_naissance: eternity: 1980-10-15 output: individus: parent1: date_naissance: 2024-11: 1970-01-01 age: 2024-11: 54 parent2: date_naissance: 2024-11: 1970-01-01 age: 2024-11: 54 parent3: date_naissance: 2024-11: 1980-10-15 age: 2024-11: 44
- name: All 3 individuals use the "ETERNITY" period for their date_naissance period: 2024-11 relative_error_margin: 0.01 input: individus: parent1: date_naissance: ETERNITY: 2000-10-15 parent2: date_naissance: ETERNITY: 1990-10-15 parent3: date_naissance: ETERNITY: 1980-10-15 output: individus: parent1: date_naissance: 2024-11: 2000-10-15 age: 2024-11: 24 parent2: date_naissance: 2024-11: 1990-10-15 age: 2024-11: 34 parent3: date_naissance: 2024-11: 1980-10-15 age: 2024-11: 44
- name: One of the 3 individuals use a month as the period for their date_naissance period: 2024-11 relative_error_margin: 0.01 input: individus: parent1: date_naissance: ETERNITY: 2000-10-15 parent2: date_naissance: 2024-11: 1990-10-15 parent3: date_naissance: ETERNITY: 1980-10-15 output: individus: parent1: date_naissance: 2024-11: 2000-10-15 age: 2024-11: 24 parent2: date_naissance: 2024-11: 1970-01-01 age: 2024-11: 54 parent3: date_naissance: 2024-11: 1980-10-15 age: 2024-11: 44
Context
I identify more as a:
The text was updated successfully, but these errors were encountered: