I'm wanting to do a date comparison in PHP of type: if DataStart & Date = DateTime + 3 days, do such thing. Otherwise, it does nothing. I tried something like this:
if ((1/86400)*(strtotime($_SESSION['buscaReserva']['dataInicio'])-strtotime(date("d/m/Y"))))>=3) {
// Do something }
else {
// Do nothing }
The two dates are initially in the format dd / mm / yyyy. But maybe I can have today's date in YYYY-mm-dd format. So maybe I have to do more than one date conversion. For example, 06/23/2015 or 2015-06-23 (today) should be at least three days less than the date of my SESSION (06/26/2015, for example).
HOW DO I DO IT?