Skip to content

Instantly share code, notes, and snippets.

@jruels
Created July 28, 2025 19:53
Show Gist options
  • Save jruels/0f0e01d8bf5ad55863f41016b23f6129 to your computer and use it in GitHub Desktop.
Save jruels/0f0e01d8bf5ad55863f41016b23f6129 to your computer and use it in GitHub Desktop.
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