Documentation

Week
in package
uses ArrayEnabled

Table of Contents

Methods

day()  : array<string|int, mixed>|int|string
WEEKDAY.
isoWeekNumber()  : array<string|int, mixed>|int|string
ISOWEEKNUM.
number()  : array<string|int, mixed>|int|string
WEEKNUM.
evaluateArrayArguments()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.
evaluateArrayArgumentsIgnore()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.
evaluateArrayArgumentsSubset()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.
evaluateArrayArgumentsSubsetFrom()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.
evaluateSingleArgumentArray()  : array<string|int, mixed>
Handles array argument processing when the function accepts a single argument that can be an array argument.

Methods

day()

WEEKDAY.

public static day(null|array<string|int, mixed>|bool|float|int|string $dateValue[, mixed $style = 1 ]) : array<string|int, mixed>|int|string

Returns the day of the week for a specified date. The day is given as an integer ranging from 0 to 7 (dependent on the requested style).

Excel Function: WEEKDAY(dateValue[,style])

Parameters
$dateValue : null|array<string|int, mixed>|bool|float|int|string

Excel date serial value (float), PHP date timestamp (integer), PHP DateTime object, or a standard date string Or can be an array of date values

$style : mixed = 1

A number that determines the type of return value 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). 2 Numbers 1 (Monday) through 7 (Sunday). 3 Numbers 0 (Monday) through 6 (Sunday). Or can be an array of styles

Return values
array<string|int, mixed>|int|string

Day of the week value If an array of values is passed as the argument, then the returned result will also be an array with the same dimensions

isoWeekNumber()

ISOWEEKNUM.

public static isoWeekNumber(mixed $dateValue) : array<string|int, mixed>|int|string

Returns the ISO 8601 week number of the year for a specified date.

Excel Function: ISOWEEKNUM(dateValue)

Parameters
$dateValue : mixed

Excel date serial value (float), PHP date timestamp (integer), PHP DateTime object, or a standard date string Or can be an array of date values

Return values
array<string|int, mixed>|int|string

Week Number If an array of numbers is passed as the argument, then the returned result will also be an array with the same dimensions

number()

WEEKNUM.

public static number(mixed $dateValue[, array<string|int, mixed>|int $method = Constants::STARTWEEK_SUNDAY ]) : array<string|int, mixed>|int|string

Returns the week of the year for a specified date. The WEEKNUM function considers the week containing January 1 to be the first week of the year. However, there is a European standard that defines the first week as the one with the majority of days (four or more) falling in the new year. This means that for years in which there are three days or less in the first week of January, the WEEKNUM function returns week numbers that are incorrect according to the European standard.

Excel Function: WEEKNUM(dateValue[,style])

Parameters
$dateValue : mixed

Excel date serial value (float), PHP date timestamp (integer), PHP DateTime object, or a standard date string Or can be an array of date values

$method : array<string|int, mixed>|int = Constants::STARTWEEK_SUNDAY

Week begins on Sunday or Monday 1 or omitted Week begins on Sunday. 2 Week begins on Monday. 11 Week begins on Monday. 12 Week begins on Tuesday. 13 Week begins on Wednesday. 14 Week begins on Thursday. 15 Week begins on Friday. 16 Week begins on Saturday. 17 Week begins on Sunday. 21 ISO (Jan. 4 is week 1, begins on Monday). Or can be an array of methods

Return values
array<string|int, mixed>|int|string

Week Number If an array of values is passed as the argument, then the returned result will also be an array with the same dimensions

evaluateArrayArguments()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.

protected static evaluateArrayArguments(callable $method, mixed ...$arguments) : array<string|int, mixed>

Example use for: ROUND() or DATE().

Parameters
$method : callable
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsIgnore()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.

protected static evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments) : array<string|int, mixed>

Example use for: HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database rather than as an array argument.

Parameters
$method : callable
$ignore : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubset()

Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.

protected static evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments) : array<string|int, mixed>

Example use for: NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need to be treated as a such rather than as an array arguments.

Parameters
$method : callable
$limit : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubsetFrom()

Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.

protected static evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments) : array<string|int, mixed>

Example use for: Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset rather than as an array argument.

Parameters
$method : callable
$start : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateSingleArgumentArray()

Handles array argument processing when the function accepts a single argument that can be an array argument.

protected static evaluateSingleArgumentArray(callable $method, array<string|int, mixed> $values) : array<string|int, mixed>

Example use for: DAYOFMONTH() or FACT().

Parameters
$method : callable
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results