days_present_in_new_zealand_in_preceeding_5_yearsInt DAY Person Formula Included used 1 time Label Missing
Value type Int . Default value 0 Entity person
How is this calculated?
To calculate this variable, the following input is used
- Int was_present_in_nz_and_entitled_to_indefinite_stay was present in New Zealand and entitled to indefinite stay
Where is this used?
This variable is referred to by these other variables in their own calculations
- Boolean citizenship__meets_5_year_presence_requirement was present in New Zealand for a minimum of 1,350 days during the 5 years immediately preceding the date of the application
This is the formula used to calculate the value of days_present_in_new_zealand_in_preceeding_5_years
This formula is used for scenarios from the date 0001-01-01 onwards. More info on formulas
def formula(persons, period, parameters): sum = 0 "\t\t** -> days_present_in_new_zealand_in_preceeding_5_years" for offset in range((days_since_n_years_ago(period.date, 5) * -1), 1): p = period.offset(offset) sum += (persons('was_present_in_nz_and_entitled_to_indefinite_stay', p) * 1) return sum