You are here

function cmfcCalendarV1Iranian::monthStartDay in Calendar Systems 8

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

Find num of Day Begining Of Month ( 0 for Sat & 6 for Sun)

File

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

Class

cmfcCalendarV1Iranian

Code

function monthStartDay($month, $day, $year) {
  list($jyear, $jmonth, $jday) = $this
    ->fromGregorian($year, $month, $day);
  list($year, $month, $day) = $this
    ->toGregorian($jyear, $jmonth, "1");
  $timestamp = parent::mktime(0, 0, 0, $month, $day, $year);
  return $this
    ->phpDate("w", $timestamp);
}