You are here

function cmfcCalendarV1Iranian::yearTotalDays in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()
  2. 5 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()
  3. 6.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()
  4. 6 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()
  5. 7.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()
  6. 7 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()
  7. 7.2 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::yearTotalDays()

Find days in this year untile now

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

File

calendar/v1/calendarSystems/iranian.class.inc.php, line 521

Class

cmfcCalendarV1Iranian

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;
}