-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for other time periods #670
Comments
I am not opposed to the creation of new time periods. |
I'm wondering about In France, for example, some values are defined as |
For France, we need to compute the revenues over the last three months. We do not use a specific time period but a multiple of MONTH. We use some specific helpers like last_3_months (or so i am on m'y phone do.i can't easily check). |
This actually depend on the variable. If this opt-in has been activated, you can just declare the income for the trimester. |
About weeks, this is going to bring tricky questions about relationship between periods. Right now, OpenFisca period model relies on the assumption that period fit well together. A However,
Also, the concept of week itself may be tricky:
|
It really depends on what you will need these periods for. In France, we handle rolling years, trimesters, rolling trimesters... But these are not valid definition period. I cannot create a variable that is defined on this type of periods. However, I can calculate a variable for a trimester (which is often summing the variable for the months contained in the trimester). |
In all case, if we were to rewrite the But I'm not 100% sure that this library exist, or that it would fit our needs. |
@fpagnoux Even in the small piece of legislation we were working on, we saw different interpretations of week, so it's likely to be even more fine-grained, eg. act-specific . There may be an opportunity to roll some of the interpretations up to be more general, once they are well scoped. The first interpretation we saw was for employees who are paid weekly. The assumption here was that there are 52 weeks in the year. For self-employed folks, a week was defined as either a whole week or a part-week, which would normally lead to 53-week years, but could potentially mean a 54-week year if there was a part-week at both ends of the year. We weren't able to clarify whether this could actually happen. That might then depend on which day of the week a week started on. @BrigetteM - do you have anything to add based on your reading of this legislation? I should also note that our team are unlikely to continue developing this solution, which was created as part of a hackathon weekend. It might be picked up by someone else in future, as might work around the NZ tax system which may need to model this too. |
That is an interesting thought, thanks 🤔 . Declaring everything on a single day indeed may avoid all this period modeling. To keep in mind 🙂. |
To put into notes a conversation with Matti (and please forgive the social security bias), the areas I know of include: most European countries will pay pensions on the same day each month. This means that most times, the times between payments will be more than 4 weeks. To make it 'fair', there is a 13th 'bonus' payment, which really just helps to ensure pensioners receive their annual rate correctly (which is calculated annually and divided by 13 to arrive at the monthly rate (why? there are 52 weeks in a 'year' (a period from and to, not 365 days) and obviously, 13 is 52 divided by 4. Hence also I believe, the discussion above about advising of your income 4 times a year. |
Closing this, as #763 will serve as existence proof that Core does support "other" time periods, and possibly a template for doing so in Core. It's less clear how a particular country might code a period of time specific to its needs though. |
In this PR, we are attempting to code the NZ Compensation for Live Organ Donors Act 2016. This requires that weekly earnings are calculated.
Income in NZ is typically based on a Weekly, Fortnightly, 4 Weekly or Monthly basis.
OpenFisca Periods currently supports MONTH, YEAR and ETERNITY.
Ideally, we would allow the user to set as input variables the amount of each pay. The code would need to be changed to support this. We suggest that this would require periods of WEEK, FORTNIGHT and 4_WEEKS, in addition to MONTH.
For the output variable
weekly_compensation_before_tax
, we suggest that this is calculated for a specific point in time immediately after the final pay period which has been entered. This might require a DAY period to be allowed.The text was updated successfully, but these errors were encountered: