0

Написал следующий код, но - пустота

        if(date('H:i') >= strtotime('19:00') && date('H:i') < strtotime('10:00')){
            print '<div class="schedule closed">Сейчас закрыты</div>';
        }
2

1 ответ 1

0

Можно сравнивать строки:

if (date('H:i') >= '19:00' || date('H:i') < '10:00') {
    print '<div class="schedule closed">Сейчас закрыты</div>';
}
1
  • if (date('H:i') >= '19:00' || date('H:i') < '10:00') - кто-то заработался?)
    – Manitikyl
    6 мая 2019 в 23:54

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.