Answers for "php check if date is two days before"

PHP
2

how to calculate days between two dates in php

$startDate = new DateTime("2019-10-27");
$endDate = new DateTime("2020-04-11");

$difference = $endDate->diff($startDate);
echo $difference->format("%a");
Posted by: Guest on January-14-2021

Code answers related to "php check if date is two days before"

Browse Popular Code Answers by Language