0
I need to know if it was worked within a fixed interval
$entrada_padrao = strtotime('08:00');//fixo como parametro
$saida_padrao = strtotime('18:00');//fixo como parametro
$entrada_trabalho = strtotime('09:00');//apontamento no relogio de ponto
$saida_trabalho = strtotime('20:50');//apontamento no relogio de ponto
In this example you have to return me TRUE
I’ve tried this logic below, but it doesn’t work because so much it can enter before $entrada_padrao how much can come out after $standard date or both
if(($entrada_trabalho <= $entrada_padrao) && ($saida_trabalho >= $entrada_padrao)){
echo "True";
}else{
echo "False";
}
which is the "range fixed"?
$entrada_padrao
or$entrada_trabalho
? I was in doubt about this, however, I suggest you edit your question and specify this. First of all, see how to create a [Mre].– gleisin-dev
edited, the standard input and standard output is fixed as standard. The user will point out the time worked and I will compare if he worked within the standard time, regardless of the time he entered or left
– Marcos A. Silva