Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
$start_ts = 1331245800; //2012-03-08 $start_ts = strtotime(date('Y-m-1',$start_ts)); $stop_ts = 1362200400; //2013-03-31 //$stop_ts = 1359781200; //2013-02-28 //$stop_ts = 1346458500; //2012-08-31 $num_days = date('t',$stop_ts); // how many days are in the month $stop_ts = strtotime(date('Y-m-'.$num_days,$stop_ts)); // set timestamp for last day of the month that the timestamp falls in. // Figure out how many months are in the date range $start_str = date('Y-m-d', $start_ts); $stop_str = date('Y-m-d', $stop_ts); $d1 = new DateTime($start_str); $d2 = new DateTime($stop_str); $month_count = ($d1->diff($d2)->m); // Months in date range echo 'Number of Months: '.$month_count;
Join the community of 500,000 technology professionals and ask your questions.