IsTimeBefore

True if the current in-fiction time is strictly before the given clock time. For “at or after” use IsTimeAfter. The two functions partition the day cleanly: at any given moment exactly one of IsTimeBefore(t) and IsTimeAfter(t) is true.

Category: Time Returns: bool

Signature

IsTimeBefore(clockTime)

The argument is a clock-time string in the project’s clock format (typically "HH:MM").

Examples

IsTimeBefore("12:00")           // true in the morning
IsTimeBefore("18:00")           // true any time before 6 PM
IsTimeBefore("06:00") || IsTimeAfter("22:00")
                                // it's "night": before 6 AM or after 10 PM

Notes

IsTimeBefore 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.”

Argument format follows the project’s clock config. Most projects use "HH:MM" 24-hour format.

Docs last synced: 2026-07-08
Screenshot viewer