TimeBucket
Returns the current time-of-day bucket as a string. E.g. "morning",
"evening". Buckets are project-defined; the runtime reads them from the
project’s time-of-day clock config.
Category: Time
Returns: string
Signature
TimeBucket()
No arguments. The result is whichever bucket label currently covers the in-fiction time.
Examples
TimeBucket() == "morning" // gate a morning-only greeting
TimeBucket() == "night" // dim the tavern lights
TimeBucket() != "morning" // any time except morning
Notes
TimeBucket reads the project’s time-of-day clock. In a project without
Time enabled, using it is an authoring error: the validator flags it when
the project loads, and at runtime the expression fails with the error
“This expression uses time-of-day which is disabled for this project.
Enable it in Project → Time.”
If the clock is enabled but the current time doesn’t fall inside any
bucket the project defines, TimeBucket() returns the empty string "".
Define buckets that cover the full 24 hours to avoid gaps.
The bucket vocabulary ("morning", "afternoon", etc.) is whatever the
project author defined in the clock config. The function just returns
the active label, it doesn’t enforce a fixed set.