From 064189ad0de7d40438de50ac0e9ada0d6b5674fc Mon Sep 17 00:00:00 2001 From: Vahid Ahmadi Date: Tue, 21 Apr 2026 12:19:57 +0100 Subject: [PATCH 1/2] Add Scottish funded early learning and childcare (#1008) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scotland's universal Funded Early Learning and Childcare (ELC) provision entitles every 3- and 4-year-old resident in Scotland to 1,140 funded hours per year, rolled out in full from August 2021 under the Children and Young People (Scotland) Act 2014 s. 48–49. Adds: - Parameters under `gov/scottish_government/funded_early_learning_childcare/`: age/min.yaml (3), age/max.yaml (5, exclusive), hours_per_year.yaml (600 from Aug 2014, 1,140 from Aug 2021). - `scottish_funded_early_learning_childcare_eligible` — a Person-level boolean gated on `country == SCOTLAND` and the age window. - YAML tests covering eligible ages, the country gate (English 3-year-old excluded), and the age boundaries (2 and 5 both false). Scope is deliberately narrow: only the universal age-based strand. The eligible-two-year-old strand (vulnerable / low-income children aged 2 under the 2014 Order), Wales's Childcare Offer, and Northern Ireland's Pre-school Education Programme remain to be added in follow-up work. Co-Authored-By: Claude Opus 4.7 (1M context) --- changelog.d/1008.md | 1 + .../age/max.yaml | 9 ++ .../age/min.yaml | 11 +++ .../hours_per_year.yaml | 12 +++ .../funded_early_learning_childcare.yaml | 82 +++++++++++++++++++ ...unded_early_learning_childcare_eligible.py | 26 ++++++ 6 files changed, 141 insertions(+) create mode 100644 changelog.d/1008.md create mode 100644 policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/max.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml create mode 100644 policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/hours_per_year.yaml create mode 100644 policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml create mode 100644 policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py diff --git a/changelog.d/1008.md b/changelog.d/1008.md new file mode 100644 index 000000000..d603ced24 --- /dev/null +++ b/changelog.d/1008.md @@ -0,0 +1 @@ +- Add `scottish_funded_early_learning_childcare_eligible` and the supporting parameters under `gov/scottish_government/funded_early_learning_childcare/` (age min/max, annual hours) to model the universal age-based strand of Scotland's Funded Early Learning and Childcare — 1,140 hours per year for all 3- and 4-year-olds resident in Scotland, rolled out in full from August 2021. Wales's Childcare Offer, Northern Ireland's Pre-school Education Programme, and the eligible-two-year-old strand in Scotland remain to be added in follow-up work. diff --git a/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/max.yaml b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/max.yaml new file mode 100644 index 000000000..41114b942 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/max.yaml @@ -0,0 +1,9 @@ +description: The Scottish Government provides funded early learning and childcare to children younger than this age (i.e. up to and including the school start year). +metadata: + unit: year + label: Funded early learning and childcare child's maximum age + reference: + - title: Children and Young People (Scotland) Act 2014 - Section 49 (Persons to whom mandatory early learning and childcare is to be made available) + href: https://www.legislation.gov.uk/asp/2014/8/section/49 +values: + 2021-08-01: 5 diff --git a/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml new file mode 100644 index 000000000..d3616ab10 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml @@ -0,0 +1,11 @@ +description: The Scottish Government provides funded early learning and childcare to children this age or older. +metadata: + unit: year + label: Funded early learning and childcare child's minimum age + reference: + - title: Children and Young People (Scotland) Act 2014 - Section 48 (Duty to secure early learning and childcare) + href: https://www.legislation.gov.uk/asp/2014/8/section/48 + - title: "Scottish Government — Funded early learning and childcare: eligibility" + href: https://www.mygov.scot/childcare-costs-help/three-four-year-olds-and-eligible-two-year-olds +values: + 2021-08-01: 3 diff --git a/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/hours_per_year.yaml b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/hours_per_year.yaml new file mode 100644 index 000000000..34b590aa1 --- /dev/null +++ b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/hours_per_year.yaml @@ -0,0 +1,12 @@ +description: Annual hours of funded early learning and childcare available to eligible children in Scotland. Scotland's expansion to 1,140 hours per year (equivalent to around 30 hours per week over 38 weeks of term time) was fully rolled out from August 2021. +metadata: + unit: hour + label: Funded early learning and childcare annual hours + reference: + - title: "Scottish Government — Funded early learning and childcare" + href: https://www.gov.scot/policies/early-education-and-care/early-learning-and-childcare/ + - title: "Education (Scotland) Act 1980 — Section 1 as amended by Children and Young People (Scotland) Act 2014" + href: https://www.legislation.gov.uk/ukpga/1980/44/section/1 +values: + 2014-08-01: 600 + 2021-08-01: 1140 diff --git a/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml b/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml new file mode 100644 index 000000000..d0222f842 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml @@ -0,0 +1,82 @@ +# Scottish funded early learning and childcare — universal age-based strand. +# 1,140 hours/year for all 3- and 4-year-olds in Scotland from August 2021. + +- name: Scottish 3-year-old is eligible + period: 2024 + input: + people: + child: + age: 3 + benunits: + benunit: + members: [child] + households: + household: + members: [child] + region: SCOTLAND + output: + scottish_funded_early_learning_childcare_eligible: true + +- name: Scottish 4-year-old is eligible + period: 2024 + input: + people: + child: + age: 4 + benunits: + benunit: + members: [child] + households: + household: + members: [child] + region: SCOTLAND + output: + scottish_funded_early_learning_childcare_eligible: true + +- name: English 3-year-old is not eligible for the Scottish programme + period: 2024 + input: + people: + child: + age: 3 + benunits: + benunit: + members: [child] + households: + household: + members: [child] + region: LONDON + output: + scottish_funded_early_learning_childcare_eligible: false + +- name: Scottish 2-year-old is not eligible under the universal strand + period: 2024 + input: + people: + child: + age: 2 + benunits: + benunit: + members: [child] + households: + household: + members: [child] + region: SCOTLAND + output: + scottish_funded_early_learning_childcare_eligible: false + +- name: Scottish 5-year-old is no longer eligible (has reached school age) + period: 2024 + input: + people: + child: + age: 5 + benunits: + benunit: + members: [child] + households: + household: + members: [child] + region: SCOTLAND + output: + scottish_funded_early_learning_childcare_eligible: false diff --git a/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py b/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py new file mode 100644 index 000000000..2a47a78ee --- /dev/null +++ b/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py @@ -0,0 +1,26 @@ +from policyengine_uk.model_api import * + + +class scottish_funded_early_learning_childcare_eligible(Variable): + value_type = bool + entity = Person + label = "eligible for Scottish funded early learning and childcare" + documentation = ( + "Whether this person is eligible for the universal age-based strand of " + "Scotland's funded early learning and childcare (ELC) provision. Does " + "not yet model the eligible-two-year-old strand (vulnerable / low-income " + "children aged 2 also qualify under Part 2 of the 2014 Order)." + ) + definition_period = YEAR + reference = "https://www.legislation.gov.uk/asp/2014/8/section/48" + + def formula(person, period, parameters): + country = person.household("country", period) + countries = country.possible_values + in_scotland = country == countries.SCOTLAND + + age = person("age", period) + p = parameters(period).gov.scottish_government.funded_early_learning_childcare + meets_age_condition = (age >= p.age.min) & (age < p.age.max) + + return in_scotland & meets_age_condition From 4a7b555f0c38e9805b753d0f77f6fab79035c0fc Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 28 Apr 2026 22:26:21 -0400 Subject: [PATCH 2/2] Require Scottish ELC start date for 3-year-olds --- .../age/min.yaml | 4 +++- .../funded_early_learning_childcare.yaml | 22 +++++++++++++++++-- ...unded_early_learning_childcare_eligible.py | 20 +++++++++++++---- ...y_learning_childcare_start_date_reached.py | 17 ++++++++++++++ 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_start_date_reached.py diff --git a/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml index d3616ab10..94a75b51a 100644 --- a/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml +++ b/policyengine_uk/parameters/gov/scottish_government/funded_early_learning_childcare/age/min.yaml @@ -1,4 +1,4 @@ -description: The Scottish Government provides funded early learning and childcare to children this age or older. +description: The minimum age at which Scottish funded early learning and childcare can start, subject to the statutory term-start condition. metadata: unit: year label: Funded early learning and childcare child's minimum age @@ -7,5 +7,7 @@ metadata: href: https://www.legislation.gov.uk/asp/2014/8/section/48 - title: "Scottish Government — Funded early learning and childcare: eligibility" href: https://www.mygov.scot/childcare-costs-help/three-four-year-olds-and-eligible-two-year-olds + - title: "Scottish Government — Early learning and childcare statutory guidance: starting dates" + href: https://www.gov.scot/publications/early-learning-childcare-statutory-guidance-july-2021/pages/8/ values: 2021-08-01: 3 diff --git a/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml b/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml index d0222f842..96ac7f211 100644 --- a/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/scottish_government/funded_early_learning_childcare.yaml @@ -1,12 +1,13 @@ -# Scottish funded early learning and childcare — universal age-based strand. +# Scottish funded early learning and childcare - universal age-based strand. # 1,140 hours/year for all 3- and 4-year-olds in Scotland from August 2021. -- name: Scottish 3-year-old is eligible +- name: Scottish 3-year-old is eligible after the statutory start date period: 2024 input: people: child: age: 3 + scottish_funded_early_learning_childcare_start_date_reached: true benunits: benunit: members: [child] @@ -17,6 +18,23 @@ output: scottish_funded_early_learning_childcare_eligible: true +- name: Scottish 3-year-old is not eligible before the statutory start date + period: 2024 + input: + people: + child: + age: 3 + scottish_funded_early_learning_childcare_start_date_reached: false + benunits: + benunit: + members: [child] + households: + household: + members: [child] + region: SCOTLAND + output: + scottish_funded_early_learning_childcare_eligible: false + - name: Scottish 4-year-old is eligible period: 2024 input: diff --git a/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py b/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py index 2a47a78ee..410cc4856 100644 --- a/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py +++ b/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_eligible.py @@ -9,10 +9,15 @@ class scottish_funded_early_learning_childcare_eligible(Variable): "Whether this person is eligible for the universal age-based strand of " "Scotland's funded early learning and childcare (ELC) provision. Does " "not yet model the eligible-two-year-old strand (vulnerable / low-income " - "children aged 2 also qualify under Part 2 of the 2014 Order)." + "children aged 2 also qualify under Part 2 of the 2014 Order). " + "Three-year-olds qualify only once they have reached the statutory " + "start date." ) definition_period = YEAR - reference = "https://www.legislation.gov.uk/asp/2014/8/section/48" + reference = [ + "https://www.legislation.gov.uk/asp/2014/8/section/48", + "https://www.gov.scot/publications/early-learning-childcare-statutory-guidance-july-2021/pages/8/", + ] def formula(person, period, parameters): country = person.household("country", period) @@ -21,6 +26,13 @@ def formula(person, period, parameters): age = person("age", period) p = parameters(period).gov.scottish_government.funded_early_learning_childcare - meets_age_condition = (age >= p.age.min) & (age < p.age.max) + start_date_reached = person( + "scottish_funded_early_learning_childcare_start_date_reached", + period, + ) + eligible_three_year_old = ( + (age >= p.age.min) & (age < p.age.min + 1) & start_date_reached + ) + eligible_older_child = (age >= p.age.min + 1) & (age < p.age.max) - return in_scotland & meets_age_condition + return in_scotland & (eligible_three_year_old | eligible_older_child) diff --git a/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_start_date_reached.py b/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_start_date_reached.py new file mode 100644 index 000000000..85c4c5d1c --- /dev/null +++ b/policyengine_uk/variables/gov/scottish_government/funded_early_learning_childcare/scottish_funded_early_learning_childcare_start_date_reached.py @@ -0,0 +1,17 @@ +from policyengine_uk.model_api import * + + +class scottish_funded_early_learning_childcare_start_date_reached(Variable): + value_type = bool + entity = Person + label = "has reached the Scottish funded early learning and childcare start date" + documentation = ( + "Whether this child has reached the statutory start date for Scottish " + "funded early learning and childcare. For 3-year-olds, entitlement " + "starts at the beginning of the first term after the child's 3rd " + "birthday. This is captured as an input because annual age alone does " + "not identify the relevant birthday and local term dates." + ) + definition_period = YEAR + default_value = False + reference = "https://www.gov.scot/publications/early-learning-childcare-statutory-guidance-july-2021/pages/8/"