Friends, I'm doing a little program that reads from a database between which days of the week a certain process must be executed.
I'm getting the day of the week based on date("N")
and it gives me a number from 1-7, which would be, Monday, Tuesday, Wednesday, etc.
The issue is that making if($dia_inicio >= $dia_semana and $dia_semana <= $dia_termino)
would only work within a week, but if you chose
that the days to run will be from Saturday to Monday for example, it does not work for me.
I can not think of how to do it. If someone can give me some idea, I'm very grateful.
Greetings.