# education.cpd-hours
Totals a continuing professional development log against a requirement, for
the period that applies on a date, and says what is still to do.
Professional bodies measure CPD two ways, and both are supported:
- **Fixed periods**: a CPD year (1 April to 31 March, 1 November to
31 October) or a three-year cycle. Give `anchor`, the first day of any one
period, and `periodMonths`; the period containing `onDate` is found by
counting whole periods from the anchor, forwards or backwards.
- **Rolling periods**: "35 hours in the last three years", checked on any
date. The period is the `periodMonths` ending on `onDate`: 12 months on
31 March 2026 runs from 1 April 2025.
## Decisions
- **Minutes, not hours.** CPD is logged in hours and half hours and quarter
hours; minutes keep every sum exact. 35 hours is 2100.
- **Entries after `onDate` do not count yet**, even inside a fixed period:
booked courses are not CPD done. Entries before the period start do not
count either.
- **Period boundaries use `dates.add-months` from the anchor each time**, not
step by step, so monthly periods anchored on the 31st start on the 28th
(or 29th) of February and then on 31 March again, rather than drifting to
the 28th for good. A rolling year ending 29 February 2024 starts on
1 March 2023.
- Hours in categories (structured, verifiable, participatory), carry-over
and pro-rating for part years are body-specific; filter the log per
category and call once for each.
- `rolling` with an `anchor`, or fixed without one, is refused rather than
guessed.