Function __global->date_from_week_of_year

Definitions

sources/calendar.php

  • Converts year+week to year+month+day. This is really complex. The first week of a year may actually start in December. The first day of the first week is a Monday or a Sunday, depending on configuration.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$year integer No No required parameter N/A N/A Year #
$week integer No No required parameter N/A N/A Week #

Returns

  • Month #,Day #,Year #
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Converts year+week to year+month+day. This is really complex. The first week of a year may actually start in December. The first day of the first week is a Monday or a Sunday, depending on configuration.
 *
 * @param  integer $year Year #
 * @param  integer $week Week #
 * @return array Month #,Day #,Year #
 */

function date_from_week_of_year(int $year, int $week) : array