Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php hour between

$currentTime = (new DateTime('01:00'))->modify('+1 day');
$startTime = new DateTime('22:00');
$endTime = (new DateTime('07:00'))->modify('+1 day');

if ($currentTime >= $startTime && $currentTime <= $endTime) {
    // Do something
}
Comment

PREVIOUS NEXT
Code Example
Php :: calculate age from date of birth in php 
Php :: autoload.php 
Php :: php if time is greater than 
Php :: secure random number php 
Php :: session start php 
Php :: Remove .php extension & Remove trailing slash 
Php :: php xml to json 
Php :: How to Add Custom Fonts to a WordPress Theme 
Php :: laravel has many with ids 
Php :: magento2 move Exception #0 (Exception): Notice: Undefined offset: 2 in /var/www/nucleus/htdocs/vendor/magento/framework/Encryption/Encryptor.php on line 591 
Php :: get number of days between two dates php 
Php :: get elasticsearch data magento 2 
Php :: how to set optional third parameter in routes of codeigniter 
Php :: extract text before last space php 
Php :: php json_encode float 
Php :: laravel Access to HMLHttpRequest from origin has been blocked by CORS policy: No Access-Control-Allow-Origin 
Php :: resource route laravel 8 
Php :: php call method from another class 
Php :: -store() laravel change name 
Php :: update laravel 7 to 8 
Php :: laravel collection combine 
Php :: laravel custom pagination 
Php :: CHECKING IF FILE IS EMPTY IN PHP 
Php :: laravel validation custom message example 
Php :: defining constant in config laravel 
Php :: php pdo like 
Php :: laravel sanctum 
Php :: Simple 301 redirect 
Php :: yii2 migration --fields foreign 
Php :: PHP - json_encode() 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =