Documentation

ConvertUOM
in package
uses ArrayEnabled

Table of Contents

Constants

CATEGORY_AREA  = 'Area'
CATEGORY_DISTANCE  = 'Distance'
CATEGORY_ENERGY  = 'Energy'
CATEGORY_FORCE  = 'Force'
CATEGORY_INFORMATION  = 'Information'
CATEGORY_MAGNETISM  = 'Magnetism'
CATEGORY_POWER  = 'Power'
CATEGORY_PRESSURE  = 'Pressure'
CATEGORY_SPEED  = 'Speed'
CATEGORY_TEMPERATURE  = 'Temperature'
CATEGORY_TIME  = 'Time'
CATEGORY_VOLUME  = 'Volume and Liquid Measure'
CATEGORY_WEIGHT_AND_MASS  = 'Weight and Mass'

Methods

CONVERT()  : float|array<string|int, mixed>|string
CONVERT.
getBinaryConversionMultipliers()  : array<string, array{multiplier: float|int, name: string}>
getBinaryConversionMultipliers Returns an array of the additional Multiplier prefixes that can be used with Information Units of Measure in CONVERTUOM().
getConversionCategories()  : array<string|int, string>
getConversionGroups Returns a list of the different conversion groups for UOM conversions.
getConversionCategoryUnitDetails()  : array<string, array<int, array<string, string>>>
getConversionGroupUnitDetails.
getConversionCategoryUnits()  : array<string|int, array<string|int, string>>
getConversionGroupUnits Returns an array of units of measure, for a specified conversion group, or for all groups.
getConversionMultipliers()  : array<string, array{multiplier: float, name: string}>
getConversionMultipliers Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().
convertTemperature()  : float|int
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.

Constants

CATEGORY_AREA

public mixed CATEGORY_AREA = 'Area'

CATEGORY_DISTANCE

public mixed CATEGORY_DISTANCE = 'Distance'

CATEGORY_ENERGY

public mixed CATEGORY_ENERGY = 'Energy'

CATEGORY_FORCE

public mixed CATEGORY_FORCE = 'Force'

CATEGORY_INFORMATION

public mixed CATEGORY_INFORMATION = 'Information'

CATEGORY_MAGNETISM

public mixed CATEGORY_MAGNETISM = 'Magnetism'

CATEGORY_POWER

public mixed CATEGORY_POWER = 'Power'

CATEGORY_PRESSURE

public mixed CATEGORY_PRESSURE = 'Pressure'

CATEGORY_SPEED

public mixed CATEGORY_SPEED = 'Speed'

CATEGORY_TEMPERATURE

public mixed CATEGORY_TEMPERATURE = 'Temperature'

CATEGORY_TIME

public mixed CATEGORY_TIME = 'Time'

CATEGORY_VOLUME

public mixed CATEGORY_VOLUME = 'Volume and Liquid Measure'

CATEGORY_WEIGHT_AND_MASS

public mixed CATEGORY_WEIGHT_AND_MASS = 'Weight and Mass'

Methods

CONVERT()

CONVERT.

public static CONVERT(array<string|int, mixed>|float|int|string $value, string|array<string|int, string> $fromUOM, string|array<string|int, string> $toUOM) : float|array<string|int, mixed>|string

Converts a number from one measurement system to another. For example, CONVERT can translate a table of distances in miles to a table of distances in kilometers.

Excel Function: CONVERT(value,fromUOM,toUOM)

Parameters
$value : array<string|int, mixed>|float|int|string

the value in fromUOM to convert Or can be an array of values

$fromUOM : string|array<string|int, string>

the units for value Or can be an array of values

$toUOM : string|array<string|int, string>

the units for the result Or can be an array of values

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

Result, or a string containing an error If an array of numbers is passed as an argument, then the returned result will also be an array with the same dimensions

getBinaryConversionMultipliers()

getBinaryConversionMultipliers Returns an array of the additional Multiplier prefixes that can be used with Information Units of Measure in CONVERTUOM().

public static getBinaryConversionMultipliers() : array<string, array{multiplier: float|int, name: string}>
Return values
array<string, array{multiplier: float|int, name: string}>

getConversionCategories()

getConversionGroups Returns a list of the different conversion groups for UOM conversions.

public static getConversionCategories() : array<string|int, string>
Return values
array<string|int, string>

getConversionCategoryUnitDetails()

getConversionGroupUnitDetails.

public static getConversionCategoryUnitDetails([string|null $category = null ]) : array<string, array<int, array<string, string>>>
Parameters
$category : string|null = null

The group whose units of measure you want to retrieve

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

getConversionCategoryUnits()

getConversionGroupUnits Returns an array of units of measure, for a specified conversion group, or for all groups.

public static getConversionCategoryUnits([string|null $category = null ]) : array<string|int, array<string|int, string>>
Parameters
$category : string|null = null

The group whose units of measure you want to retrieve

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

getConversionMultipliers()

getConversionMultipliers Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().

public static getConversionMultipliers() : array<string, array{multiplier: float, name: string}>
Return values
array<string, array{multiplier: float, name: string}>

convertTemperature()

protected static convertTemperature(string $fromUOM, string $toUOM, float|int $value) : float|int
Parameters
$fromUOM : string
$toUOM : string
$value : float|int
Return values
float|int

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