You are here

function date_calc_first_of_month_weekday in Date 6.2

Same name and namespace in other branches
  1. 5.2 date_php4/date_php4_calc.inc \date_calc_first_of_month_weekday()
  2. 6 date_php4/date_php4_calc.inc \date_calc_first_of_month_weekday()

Find the day of the week for the first of the month of given date

Parameters

int $month: The month.

int $year: The 4 digit year. Do not add leading 0's for years prior to 1000.

Return value

int Number of weekday for the first day, 0=Sunday.

2 calls to date_calc_first_of_month_weekday()
date_calc_get_calendar_month in date_php4/date_php4_calc.inc
Return a set of arrays to construct a calendar month for the given date.
date_calc_weeks_in_month in date_php4/date_php4_calc.inc
Returns the number of rows on a calendar month. Useful for determining the number of rows when displaying a typical month calendar.

File

date_php4/date_php4_calc.inc, line 1320

Code

function date_calc_first_of_month_weekday($month = 0, $year = 0) {
  if (empty($year)) {
    $year = date_calc_get_year();
  }
  if (empty($month)) {
    $month = date_calc_get_month();
  }
  return date_dow('01', $month, $year);
}