Comparing Date strings in PHP is easy using strtotime function.
The strtotime function returns # of seconds since Jan 1,1970 UTC.
Simple example:
$strtDate = strtotime("2009-10-3");
$endDate = strtotime("2010/11/9");
if($strtDate > $endDate){
// do something
}
if($strtDate < $endDate){
/do something
}
Subscribe to:
Post Comments (Atom)
Detectron2 + PyTorch CPU : Fix Install issue
Detectron2 + PyTorch CPU ❌ The error $ pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision $ pip inst...
-
How to fix Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' Apparently, Ma...
-
If you get the following error while installing FFMPEG or other packages on CentOS 7. Requires: libva.so.1(VA_API_0.33.0)(64bit) Follow...
-
Common error: fallocate: fallocate failed: Text file busy in ubuntu OS Check the allocation: free -m or sudo swapon --show Make sure ...
No comments:
Post a Comment