I need a function in php4 that will calculate the date difference in the provided date format. eg.
$date1 = "2011-08-24 10:03:00";
$date2 = "2012-09-24 10:04:31";
$format1 = "Y W" ; //This format should return the difference in Year and week.
$format2 = "M D"; // This format should return the difference in Months and days.
// The format can be any combination of Year,Month,Day,Week,Hour,Minute,Second.
function ConvertDate($data1,$date2,$format)
Please let me know if you need any more details on this. Thanks in advance.