You are here

function date_calc_get_calendar_year in Date 6

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

Return a set of arrays to construct a calendar year for the given date

Parameters

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

string $format: The string indicating how to format the output.

Return value

array $year[$month][$row][$col]

File

date_php4/date_php4_calc.inc, line 818

Code

function date_calc_get_calendar_year($year = 0, $format = DATE_CALC_FORMAT) {
  if (empty($year)) {
    $year = date_calc_get_year();
  }
  $year_array = array();
  for ($curr_month = 0; $curr_month <= 11; $curr_month++) {
    $year_array[$curr_month] = date_calc_get_calendar_month($curr_month + 1, $year, $format);
  }
  return $year_array;
}