Functional Weave
Code in TypeScript

education.school-year-group@1.0.1

README.md

3,315 bytes · view raw

# education.school-year-group

The school year group a child is in on a date, from their date of birth, in
each UK nation: the normal age-for-year placement, before any deferral or
decision to place a child out of their year group.

| nation | the cohort is born | starts | year groups |
|---|---|---|---|
| England, Wales | 1 September to 31 August | Reception, in the September after the 4th birthday | Reception, Year 1 to Year 13 |
| Scotland | 1 March to the end of February | P1, in August, aged about 4½ to 5½ | P1 to P7, S1 to S6 |
| Northern Ireland | 2 July to 1 July (4 on or before 1 July) | P1, in September | P1 to P7, Year 8 to Year 14 |

## How it works, and the leap-day trap

The cohort is decided from the birth date itself: a child born on or after the
nation's cohort start date (1 September, 1 March, 2 July) joins the class that
starts the year after four years on; one born before it, the year before.
The school year containing `onDate` then gives how many years along they are.

Working from the child's *age* on a cut-off date instead goes wrong on
29 February in Scotland: a child born 29 February 2020 is in the cohort born
1 March 2019 to 29 February 2020, but has the same age as the 1 March 2020
children on every late-February date in later years (a birthday of 29
February counts as 1 March in common years). A vector pins it.

## Decisions

- **School year boundaries** are 1 September (England, Wales, Northern
  Ireland) and 1 August (Scotland, whose schools go back mid-August; each
  council sets the exact day). A date between that boundary and the first
  day of term is placed in the new year group.
- `index` is always returned; `yearGroup` is null before Reception or P1
  (nursery and pre-school are not named) and after the last year.
- Deferred entry (Scotland's January and February births, summer-born
  children in England, Northern Ireland's 1 April to 1 July births) and
  children educated out of their year group are the caller's to apply: shift
  `index` by the years deferred.
- The rules are long-standing conventions rather than dated rates, so the
  tables carry no `effective` columns and always ship whole.

## Sources

- GOV.UK, "School admissions: school starting age" ("Most children start
  reception full-time in September after their fourth birthday"):
  https://www.gov.uk/schools-admissions/school-starting-age
- mygov.scot, "Choosing a school for your child", and Education Scotland
  Parentzone, "Starting school" (a year group is born between the start of
  March and the end of February; P1 starts in August):
  https://www.mygov.scot/register-your-child-for-a-school ,
  https://education.gov.scot/parentzone/my-child/transitions/starting-school
- nidirect, "Deferral of pre-school or primary school places", and
  Department of Education NI, "Compulsory education" (children aged 4 on or
  before 1 July start P1 that September):
  https://www.nidirect.gov.uk/articles/deferral-pre-school-or-primary-school-places ,
  https://www.education-ni.gov.uk/articles/compulsory-education

## Notices

Contains public sector information licensed under the Open Government
Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

1.0.1 adds its attribution notices (NOTICE). The code and the tests are unchanged.