Wrote the following code, but - the void
if(date('H:i') >= strtotime('19:00') && date('H:i') < strtotime('10:00')){ print '<div class="schedule closed">Сейчас закрыты</div>'; }
strtotime(date("H:i"))
You can compare strings:
if (date('H:i') >= '19:00' || date('H:i') < '10:00') { print '<div class="schedule closed">Сейчас закрыты</div>'; }
if (date('H:i') >= '19:00' || date('H:i') < '10:00')
Source: https://ru.stackoverflow.com/questions/978729/More articles:Platform and ball collision [closed]Java / C # Why does one function with the same parameters show different execution times?Upload pictures and send to chat TelegramHow to serialize a class in which there is an enclosed class in XML?Invert Filtering objects on the Yandex map (ObjectManager, setFilter)JS (canvas) how to additionally change the color at the verticesWhat library is needed to work with dates, strings and colors in c ++?Django - is the cache timeout counted after the last access or after its installation?301 redirect and redirect to index.phpEuler project. Problem 106. Sums of special subsets: meta-verificationAll Articles
strtotime(date("H:i"))
- Vladislav