jeudi 25 mars 2021

Show text if current time is between 9:00pm and 10:30pm on friday

I am trying to show a text in a page only on Thursday between 9pm to 10pm.

At the moment I wrote this code:

if((date('N') == 4 && date('G') >= 21) || (date('N') == 4 && date('G') < 22)) {
    echo "Text";
}

but not work.

Aucun commentaire:

Enregistrer un commentaire