alin19 Posted April 3, 2008 Share Posted April 3, 2008 $date=date("Y-m-d"); //date today $data=strtotime($date); // $data_c=strtotime($data_creare[$i]); //date when the acount was created $data_e=$data_c+$valabilitate[$i]*86400;//date when the acount was created + number of days that last the acount * 86400 $zile_ram=$data_e-$data; //days that ramains in format time() $zile_ramE=$zile_ram/86400; //days that remains in format if date created=2008-02-25 and last days = 90 it outputs 52.041666666667 when it should output 52, why is this? Link to comment https://forums.phpfreaks.com/topic/99337-caunting-number-of-day-ramains/ Share on other sites More sharing options...
alin19 Posted April 3, 2008 Author Share Posted April 3, 2008 i think it's from the time changing, +1 h on 30.03.2008 only the creating date defore that has this problem, i've solve it with round(); Link to comment https://forums.phpfreaks.com/topic/99337-caunting-number-of-day-ramains/#findComment-508268 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.