Rapu Ture - Exploring the Rules

Has spouse as per Student Allowances Regulations 1998

Student 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

Where is this used?

This variable is referred to by these other variables in their own calculations


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