Has spouse as per Student Allowances Regulations 1998Student Allowance Boolean MONTH Person Formula Included used 1 time
Value type Boolean . Default value false Entity person
How is this calculated?
To calculate this variable, the following input is used
- Int age The age of a Person (in years)
- Date date_of_birth Birth date
- Int age_of_partner The age of partner in a family
- Boolean student_allowance__has_a_supported_child has a supported child as per Student Allowances Regulations 1998
- Boolean student_allowance__partner_has_a_supported_child their spouse has a supported child, as per Student Allowances Regulations 1998
Where is this used?
This variable is referred to by these other variables in their own calculations
- Boolean student_allowance__is_married_or_partnered married or partnered as per Student Allowances Regulations 1998
This is the formula used to calculate the value of student_allowance__has_a_spouse
This formula is used for scenarios from the date 0001-01-01 onwards. More info on formulas
def formula(persons, period, parameters): # NOTE: using the age at the start of the month # Age changes on a DAY, but this calculation only has a granularity of MONTH part_a = (persons('age', period.start) >= 24) * (persons('age_of_partner', period.start) >= 24) part_b = ((persons('age', period.start) >= 24) + (persons('age_of_partner', period.start) >= 24)) * \ (persons('student_allowance__has_a_supported_child', period) + persons('student_allowance__partner_has_a_supported_child', period)) return part_a + part_b