CurrentTimeBucket
Returns the current time bucket as a string, for example 'morning' or
'evening'. Time buckets are project-defined; the runtime reads them
from the project’s time-of-day clock config.
Category: Time Returns: string
Signature
CurrentTimeBucket()
No arguments. The result is whichever time-bucket label currently covers the in-fiction time.
Examples
CurrentTimeBucket() == 'morning' // gate a morning-only greeting
CurrentTimeBucket() == 'night' // dim the tavern lights
CurrentTimeBucket() != 'morning' // any time except morning
Notes
- Requires time to be enabled for the project (Project, then Time). With time disabled, any expression using this function fails validation.
- Compare
CurrentTimeBucket()only against ids you declared in Project → Time. The validator checks every== '...'/!= '...'comparison against the declared time-bucket list and rejects unknown ids, since a misspelled bucket name would otherwise parse fine and just never match. - If the clock is enabled but the current time doesn’t fall inside any
time bucket the project defines,
CurrentTimeBucket()returns the empty string''. Define buckets that cover the full 24 hours to avoid gaps. - Renamed from
TimeBucketto line up with the other clock-of-day readers (CurrentHour, CurrentMinute).