Documentation

Difference
in package
uses ArrayEnabled

Table of Contents

Properties

$arrayArgumentHelper  : ArrayArgumentHelper
$initializationNeeded  : bool

Methods

interval()  : array<string|int, mixed>|int|string
DATEDIF.
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.
datedifD()  : int
datedifM()  : int
datedifMD()  : int
datedifY()  : int
datedifYD()  : int
datedifYM()  : int
initialDiff()  : float
initialiseHelper()  : void
replaceRetValue()  : null|bool|int
Decide whether it's time to set retVal.
testFalse()  : bool

Properties

$initializationNeeded

private static bool $initializationNeeded = true

Methods

interval()

DATEDIF.

public static interval(mixed $startDate, mixed $endDate[, array<string|int, mixed>|string $unit = 'D' ]) : array<string|int, mixed>|int|string
Parameters
$startDate : mixed

Excel date serial value, PHP date/time stamp, PHP DateTime object or a standard date string Or can be an array of date values

$endDate : mixed

Excel date serial value, PHP date/time stamp, PHP DateTime object or a standard date string Or can be an array of date values

$unit : array<string|int, mixed>|string = 'D'

Or can be an array of unit values

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

Interval between the dates If an array of values is passed for the $startDate or $endDays,arguments, then the returned result will also be an array with matching 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>

datedifD()

private static datedifD(float $difference) : int
Parameters
$difference : float
Return values
int

datedifM()

private static datedifM(DateInterval $PHPDiffDateObject) : int
Parameters
$PHPDiffDateObject : DateInterval
Return values
int

datedifMD()

private static datedifMD(int $startDays, int $endDays, DateTime $PHPEndDateObject, DateInterval $PHPDiffDateObject) : int
Parameters
$startDays : int
$endDays : int
$PHPEndDateObject : DateTime
$PHPDiffDateObject : DateInterval
Return values
int

datedifY()

private static datedifY(DateInterval $PHPDiffDateObject) : int
Parameters
$PHPDiffDateObject : DateInterval
Return values
int

datedifYD()

private static datedifYD(float $difference, int $startYears, int $endYears, DateTime $PHPStartDateObject, DateTime $PHPEndDateObject) : int
Parameters
$difference : float
$startYears : int
$endYears : int
$PHPStartDateObject : DateTime
$PHPEndDateObject : DateTime
Return values
int

datedifYM()

private static datedifYM(DateInterval $PHPDiffDateObject) : int
Parameters
$PHPDiffDateObject : DateInterval
Return values
int

initialDiff()

private static initialDiff(float $startDate, float $endDate) : float
Parameters
$startDate : float
$endDate : float
Return values
float

initialiseHelper()

private static initialiseHelper(array<string|int, mixed>|false $arguments) : void
Parameters
$arguments : array<string|int, mixed>|false

Can be changed to array for Php8.1+

replaceRetValue()

Decide whether it's time to set retVal.

private static replaceRetValue(bool|int $retVal, string $unit, string $compare) : null|bool|int
Parameters
$retVal : bool|int
$unit : string
$compare : string
Return values
null|bool|int

testFalse()

private static testFalse(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results