Publisher review:date_difference.php function will calculate the difference between two dates. This function will calculate the difference between two dates and can output it as either a string or an array, indicating the amount of years, months, days, hours, minutes and seconds of difference.
The returned result can be either a string or an array.The functions has 2 argument and a third optional one. dateDifference($date1, $date2, $output);
The first two arguments are the two dates, the third (optional) one allows you to select the kind of output you want. By default this is a string in the form of x years, x monhts, xdays and x hours, x minutes, xseconds. But it's also possible to have the function return an array; this can be either a normal array (0=>x, 1=>x, 2=>x, etc.), or an associative array ("year"=>x, "month"=>", etc.) The function will always calculate a positive difference, regardless of the order in which you pass the dates.
date_difference.php is a PHP script for Time and Date scripts design by Excudo.net.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris