You are here

function cmfcCalendarV1Julian::yearTotalDays in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::yearTotalDays()
  2. 7 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::yearTotalDays()
  3. 7.2 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::yearTotalDays()

Find days in this year untile now

1 call to cmfcCalendarV1Julian::yearTotalDays()
cmfcCalendarV1Julian::date in calendar/v1/calendarSystems/julian.class.inc.php
Implementation of PHP date function This is the simplified versino by Sina Salek

File

calendar/v1/calendarSystems/julian.class.inc.php, line 529

Class

cmfcCalendarV1Julian

Code

function yearTotalDays($jmonth, $jday, $jyear) {
  $year = "";
  $month = "";
  $year = "";
  $result = "";
  if ($jmonth == "01") {
    return $jday;
  }
  for ($i = 1; $i < $jmonth || $i == 12; $i++) {
    list($year, $month, $day) = $this
      ->toGregorian($jyear, $i, "1");
    $result += lastday($month, $day, $year);
  }
  return $result + $jday;
}