Created
July 28, 2025 19:53
-
-
Save jruels/0f0e01d8bf5ad55863f41016b23f6129 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "time" | |
# Check if today is a weekday (Mon–Fri) | |
is_weekday = rule { | |
weekday = time.weekday(time.now()) | |
weekday >= 1 and weekday <= 5 | |
} | |
# Check if current hour is between 9 and 17 (9 AM to 5 PM) | |
is_business_hours = rule { | |
hour = time.hour(time.now()) | |
hour >= 9 and hour < 17 | |
} | |
# Main rule combines both conditions | |
main = rule { | |
is_weekday and is_business_hours | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment