Decodes date value from the string representation created using encodeDate(..) function.
static
original
decodeDate
(string $value)
-
string
$value: representation of the date value
Decodes float value from the string representation that was created by using encodeRealNumberRange(..) function.
static
flaot
decodeRealNumberRangeFloat
(string $value, integer $maxDigitsRight, integer $offsetValue)
-
string
$value: representation of the floating point value
-
integer
$maxDigitsRight: maximum number of digits left of the decimal point in the largest absolute value in the data set (must be the same as the one used for encoding).
-
integer
$offsetValue: offset value that was used in the original encoding
Decodes integer value from the string representation that was created by using encodeRealNumberRange(..) function.
static
integer
decodeRealNumberRangeInt
(string $value, integer $offsetValue)
-
string
$value: representation of the integer value
-
integer
$offsetValue: offset value that was used in the original encoding
Decodes zero-padded positive float value from the string representation
static
float
decodeZeroPaddingFloat
(string $value)
-
string
$value: zero-padded string representation of the float value
Decodes zero-padded positive integer value from the string representation
static
integer
decodeZeroPaddingInt
(string $value)
-
string
$value: zero-padded string representation of the integer
Encodes date value into string format that can be compared lexicographically
static
string
encodeDate
([float $microtimestamp = NULL])
-
float
$microtimestamp: date value to be encoded (microtime format - local timezone)
Encodes real number value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values.
This function handles both float and int values.
static
string
encodeRealNumberRange
(integer|float $number, integer $maxDigitsLeft, [integer $maxDigitsRight = 0], [integer $offsetValue = 0])
-
integer|float
$number: real number to be encoded
-
integer
$maxDigitsLeft: maximum number of digits left of the decimal point in the largest absolute value in the data set
-
integer
$maxDigitsRight: maximum number of digits right of the decimal point in the largest absolute value in the data set, i.e. precision
-
integer
$offsetValue: offset value, has to be greater than absolute value of any negative number in the data set.
Encodes a positive integer or floating point value into a string by zero-padding number up to the specified number of digits.
static
string
encodeZeroPadding
(integer|float $number, integer $maxNumDigits)
-
integer|float
$number: positive integer or floating point value to be encoded
-
integer
$maxNumDigits: maximum number of digits in the largest value in the data set