You are here

function cmfcCalendarV1Julian::monthStartDay in Calendar Systems 8.2

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

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

File

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

Class

cmfcCalendarV1Julian

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