how can I create flux logic like below? hourSelection doesn’t include minute data. I need to check hours and minutes.
if ( current_time between 09:00 and 12:30)
"morning working hours"
else if ( current_time between 12:30 and 13:30)
"launch break"
else if ( current_time between 13:30 and 18:00)
"afternoon working hours"
else
"other"
You can form the condition by combining date.hour() with date.minute(), however it gets messy soon (((hour == 12 and minute > 30)) or hour > 12) and ((hour ==13 and minute <= 30) or hour < 13))) …
But can also truncate current_time to the day, then add resp. hours/minutes to it to create the values you want to compare with. So a bit more complicated to setup the boundaries but you can then compare easily (current_time > begin_time and current_time <= end_time).