How canon4o/periods works
Periods is a small PHP date-period library. Callers create a validated period directly or through PeriodFactory, then use it to iterate dates, measure length, compare periods, and check dates and boundaries. PeriodInterval selects the step used for iteration and gap measurement. The graph stays at the runtime-library level; tests and development tooling are excluded.
Main entry points: Period.php Period operations · PeriodFactory.php Period factory · PeriodInterval.php Interval units · PeriodException.php Period exception
Components 6
Other components
- Library caller
- Period factory
src/PeriodFactory.php - Period operations
src/Period.php - Interval units
src/PeriodInterval.php - Period exception
src/PeriodException.php - PHP date APIs
Connections 7
- Library caller → Period factory: creates periods
README.md - Library caller → Period operations: constructs directly
README.md - Period factory → Period operations: creates
src/PeriodFactory.php - Period operations → Period exception: throws on invalid range
src/Period.php - Period operations → Interval units: uses interval
src/Period.php - Period operations → PHP date APIs: iterates with DatePeriod
src/Period.php - Interval units → PHP date APIs: creates DateInterval
src/PeriodInterval.php