Skip to main content
function time(...entries): SemanticTimeEntry;
Define a named semantic time period.

Parameters

entries
required
…[SemanticTimeVariant, ...SemanticTimeVariant[]]

Returns

SemanticTimeEntry
Each entry has startTime/endTime and optional dayOfWeek or dates scoping. Entries without scoping are the default and apply every day in the scheduling period. The surrounding object key is only a name, it does not add scope. For example, thursday_open: time({ startTime: ..., endTime: ... }) still applies on Monday, Tuesday, and every other scheduling day unless you add dayOfWeek: ["thursday"]. Use semantic times to represent business periods, not shift patterns. Some periods have explicit boundaries in the requirements. Others are inferred so related coverage and rules can attach to the correct part of the day. Choose the simplest set of semantic times that preserves the business distinctions you need. Avoid adding a broad all-day semantic time when narrower windows already describe the day’s distinct requirements. If opening, core trading, and closing each need different coverage, model those windows directly instead of layering an extra whole-day period on top unless the lower bound truly applies for the full span.