was present in New Zealand this many days in the last (rolling) yearInt DAY Person Formula Included used 2 times
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_each_year_minimum_presence_requirements was present in New Zealand for at least 240 days in each the 5 years immediately preceding the date of application
- Boolean citizenship__meets_preceeding_single_year_minimum_presence_requirement was present in New Zealand for at least 240 days in one rolling year immediately preceding the date of application
This is the formula used to calculate the value of days_present_in_new_zealand_in_preceeding_year
This formula is used for scenarios from the date 0001-01-01 onwards. More info on formulas
def formula(persons, period, parameters): sum = 0 start_date = days_since_n_years_ago(period.date) for p in [period.offset(offset) for offset in range((start_date * -1), 0)]: sum += (persons('was_present_in_nz_and_entitled_to_indefinite_stay', p) * 1) return sum