The age of a Person (in years)Int DAY Person Formula Included used 23 times
Value type Int . Default value -9999 Entity person
How is this calculated?
To calculate this variable, the following input is used
- Date date_of_birth Birth date
Where is this used?
This variable is referred to by these other variables in their own calculations
- Boolean acc__sched_1__lope_eligible Corporation determination of incapacity
- Int age_of_partner The age of partner in a family
- Int age_of_youngest The age of the youngest member of a family
- Boolean citizenship__citizenship_by_grant_may_be_authorized statisfies criteria such that the Minister may authorise the grant of New Zealand citizenship to this person
- Boolean disability_allowance__family_has_eligible_child Does the family have a child who meets the criteria for disabled
- Boolean family_scheme__caregiver_age_qualifies Is a person qualified under the family scheme age parameters
- Boolean income_tax__dependent_child Determines if a Person is classified as financially dependant
- Boolean jobseeker_support__meets_age_threshold Meets the age test for Jobseeker Support?
- Boolean social_security__eligible_for_accommodation_supplement Eligible for Accommodation Supplement
- Boolean social_security__eligible_for_community_services_card is eligible for Community Services Card
- Boolean social_security__eligible_for_orphans_benefit Eligible for Orphan's benefit
- Boolean social_security__eligible_for_supported_living_payment Eligible for Supported Living Payment.
- Boolean social_security__eligible_for_unsupported_childs_benefit Eligible for Unsupported child’s benefit
- Boolean social_security__is_a_child child means a single person under the age of 18 years, other than a person who is— (a) aged 16 years or 17 years; and (b) financially independent
- Boolean social_security__meets_young_parent_payment_basic_requirements Meets young parent payment basic requirements
- Boolean social_security__meets_young_parent_payment_single_persons_requirements Meets Young Parent Payment single person requirements from section 165
- Boolean social_security_regulation__family_has_child_eligible_for_disability_allowance_child_under_6 Family has a child under 6 years old and eligible for Disability Allowance and in minimum childcare hours per week
- Boolean social_security_regulation__family_has_resident_child_aged_5_who_will_be_enrolled_in_school Family has resident child aged 5 who will be enrolled in school and in minimum childcare hours per week
- Boolean social_security_regulation__family_has_resident_child_under_5_not_in_school Family has a resident child who is under 5 years old, not in school and in minimum childcare hours per week
- Boolean sole_parent_support__meets_age_threshold Meets the age test for sole parent support?
- Boolean student_allowance__eligible_for_basic_grant eligibily for Student Allowance basic grant
- Boolean student_allowance__eligible_for_certain_allowances Eligible to certain allowances under Student Allowance Regulations
- Boolean student_allowance__has_a_spouse Has spouse as per Student Allowances Regulations 1998
This is the formula used to calculate the value of age
This formula is used for scenarios from the date 0001-01-01 onwards. More info on formulas
def formula(persons, period, parameters): birth = persons('date_of_birth', period) birth_year = birth.astype('datetime64[Y]').astype(int) + 1970 birth_month = birth.astype('datetime64[M]').astype(int) % 12 + 1 birth_day = (birth - birth.astype('datetime64[M]') + 1).astype(int) is_birthday_past = (birth_month < period.start.month) + (birth_month == period.start.month) * (birth_day <= period.start.day) return (period.start.year - birth_year) - where(is_birthday_past, 0, 1) # If the birthday is not passed this year, substract one year