Add qualifying week to maternity, paternity and adoption #2040
+86
−76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale
This change updates the maternity, paternity and adoption smart answer calculators by asking the user if they were, or will be, employed during the qualifying week - rather than the present date when they are completing the questions.
The qualifying week (QW) is, broadly, the 15th week before the expected week of childbirth or adoption. It's worked out by finding the Sunday before the due or match date (or due day itself if it's a Sunday). The QW is 15 Sundays back from there.
For example, if the due date is 1 January 2016, the QW is 13 September.
For further details see:
https://www.pivotaltracker.com/n/projects/1270592/stories/104083442
Expected changes

- [Example Paternity URL](https://www.gov.uk/maternity-paternity-calculator/y/paternity/yes/2016-01-01/2016-01-01/yes/yes/yes) - Question should be: "Was the employee (or will they be) on your payroll on 13 September 2015?"
- [Example Adoption URL](https://www.gov.uk/maternity-paternity-calculator/y/adoption/yes/2016-01-01/2016-01-01/yes/yes/yes) - Question should be: "Was the employee (or will they be) on your payroll on 13 September 2015?"