Create a new RRStack.
Constructor options. timeUnit
defaults to 'ms'
.
Readonly
optionsNormalized, frozen options. Mutate via timezone, rules, or updateOptions.
Get the configured time unit ('ms' | 's'). Immutable.
Get the current IANA timezone id (unbranded string).
Classify a range [from, to)
as 'active'
, 'blackout'
, or 'partial'
.
Start of the window (inclusive), in the configured unit.
End of the window (exclusive), in the configured unit.
Compute effective active bounds across all rules.
{ start?: number; end?: number; empty: boolean }
start
and/or end
are omitted for open-sided coverage.empty
indicates no active coverage.Stream contiguous status segments over [from, to)
. *
Start of the window (inclusive), in the configured unit.
End of the window (exclusive), in the configured unit.
An iterable of { start, end, status }
entries. Memory-bounded
and stable for long windows.
Determine whether the stack is active at t
.
Timestamp in the configured unit.
true when active; false when blackout.
Return the current time in the configured unit.
Serialize the stack to JSON.
A RRStackOptions including version
injected at build time
(fallback '0.0.0'
in dev/test).
Batch update timezone and/or rules in one pass.
Partial options containing timezone
and/or rules
.
Static
asValidate and brand a timezone id.
Candidate IANA timezone string.
The branded TimeZoneId.
Static
isValidate an IANA timezone id.
Candidate IANA timezone string.
True if recognized by the host ICU/Intl data.
Library entry point.