function cmfcCalendarV1Gregorian::dateDiff in Calendar Systems 7
Same name and namespace in other branches
- 8 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
- 8.2 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
- 5 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
- 6.3 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
- 6 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
- 7.3 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
- 7.2 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::dateDiff()
Overrides cmfcCalendarV1Plugin::dateDiff
File
- calendar/v1/ calendarSystems/ gregorian.class.inc.php, line 117 
Class
- cmfcCalendarV1Gregorian
- @desc
Code
function dateDiff($first, $second) {
  $first_date = explode("-", $first);
  $first_date = parent::mktime(0, 0, 0, $first_date[1], $first_date[2], $first_date[0]);
  //echo $first_date[1];
  $second_date = explode("-", $second);
  $second_date = parent::mktime(0, 0, 0, $second_date[1], $second_date[2], $second_date[0]);
  $totalsec = $second_date - $first_date;
  return $totalday = round($totalsec / 86400);
}