Semantic Time
Semantic time lets you define named time periods (“morning”, “lunch_rush”, “closing”) that map to concrete hours. The same name can mean different times on different days.Why semantic time?
Businesses think in terms like “we need 3 servers during lunch rush” — not “we need 3 servers from 11:00 to 14:00”. Semantic time bridges that gap:- Define periods once with human-readable names
- Reference them in coverage requirements
- Let the system resolve to concrete hours based on the day
Defining semantic times
UsedefineSemanticTimes to create a context with named periods:
Variants by day
The same semantic time can have different hours depending on the day of week:Creating coverage from semantic times
Usetimes.coverage() to define coverage in semantic terms, then times.resolve() to produce concrete coverage requirements:
CoverageRequirement per day, applying any day-specific variants automatically.