Zahlen#
Ein Referenzdokument, das integrierte Komfortfunktionen zur Unterstützung der Datentransformation in Ausdrücken für Zahlen auflistet.
JavaScript in Ausdrücken
Sie können jedes JavaScript in Ausdrücken verwenden. Weitere Informationen finden Sie unter Ausdrücke.
ceil(): Number #
Rounds up a number to a whole number.
floor(): Number #
Rounds down a number to a whole number.
format(locales?: LanguageCode, options?: FormatOptions): String #
This is a wrapper around Intl.NumberFormat(). Returns a formatted string of a number based on the given LanguageCode and FormatOptions. When no arguments are given, transforms the number in a like format 1.234.
Function parameters#
localesOptionalString
An IETF BCP 47 language tag.
optionsOptionalObject
Configure options for number formatting. Refer to MDN | Intl.NumberFormat() for more information.
isEven(): Boolean #
Returns true if the number is even. Only works on whole numbers.
isOdd(): Boolean #
Returns true if the number is odd. Only works on whole numbers.
round(decimalPlaces?: Number): Number #
Returns the value of a number rounded to the nearest whole number, unless a decimal place is specified.
Function parameters#
decimalPlacesOptionalNumber
How many decimal places to round to.
toBoolean(): Boolean #
Converts a number to a boolean.
0
converts to false
. All other values convert to true
.
toDateTime(format?: String): Date #
Converts a number to a Luxon date object.
Function parameters#
formatOptionalString enum
Can be ms
(milliseconds), s
(seconds), or excel
(Excel 1900). Defaults to milliseconds.