MinutesUntil
Minutes until the next occurrence of a clock time. Always forward: if the target time already passed today, the count wraps to tomorrow’s occurrence instead of going negative.
Category: Time Returns: int
Signature
MinutesUntil(clockTime)
The argument is a clock time written as quoted “HH:MM” text, like ‘18:00’. The validator rejects anything else.
Examples
MinutesUntil('18:00') == 0 // it's exactly 18:00 right now
MinutesUntil('06:00') < 30 // sunrise in under half an hour
MinutesUntil('12:00') > FromHours(20) // noon just passed; almost a full day until it returns
Notes
- Requires time to be enabled for the project (Project, then Time). With time disabled, any expression using this function fails validation.
- Returns
0when the current time exactly matches the target, and grows up to1439as the target recedes into “just missed it” territory before wrapping back toward0the next day. - Pairs with IsTimeBetween to react just before a
window closes: check
MinutesUntil(end) < 5alongside the window test.