days_present_in_new_zealand_in_preceeding_5_years
Int DAY Person Formula Included used 1 time Label MissingValue 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
- Boolean immigration__entitled_to_indefinite_stay is entitled in terms of the Immigration Act 2009 to be in New Zealand indefinitely
- Boolean present_in_new_zealand was present in New Zealand on this day
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
Formulas
This is the formula used to calculate the value of days_present_in_new_zealand_in_preceeding_5_years
0001-01-01
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