The below code may help:
$ts1 = previous date;
$ts2 = currenct date;
$seconds_diff = $ts2 – $ts1;
$no_of_days = 30 – floor($seconds_diff/3600/24);
The below code may help:
$ts1 = previous date;
$ts2 = currenct date;
$seconds_diff = $ts2 – $ts1;
$no_of_days = 30 – floor($seconds_diff/3600/24);