[APP][Pro] Better Logic Library - For Users

The number method

Within BLL coding or expressions you can use the number method to convert numbers into text, based on your (or another) locale/language.
It supports overloading, and can be used the following ways:

  • number(number, decimals?, locale?)
  • number(number, style?, decimals?, locale?)
  • number(number, style?, styleOption1?, decimals?, locale?)
  • number(number, style?, styleOption1?, styleOption2?, locale?)
  • number(number, style?, styleOption1?, styleOption2?, decimals?, locale?)

There are 4 styles (decimal is the default):

  • decimal
  • currency
  • percent
  • unit

Decimal

Styleoption1:

  • standaard
  • scientific
  • engineering
  • compact_short
  • compact_long

Styleoption2:

  • standaard
  • noGrouping

Currency

StyleOption1:

  • Any valid currency, like USD or EUR

StyleOption2:

  • symbol
  • narrowSymbol
  • code
  • name

Percent

Has no styleoptions

Unit

StyleOption1:

  • acre
  • bit
  • byte
  • celsius
  • centimeter
  • day
  • degree
  • fahrenheit
  • fluid-ounce
  • foot
  • gallon
  • gigabit
  • gigabyte
  • gram
  • hectare
  • hour
  • inch
  • kilobit
  • kilobyte
  • kilogram
  • kilometer
  • liter
  • megabit
  • megabyte
  • meter
  • mile
  • mile-scandinavian
  • milliliter
  • millimeter
  • millisecond
  • minute
  • month
  • ounce
  • percent
  • petabyte
  • pound
  • second
  • stone
  • terabit
  • terabyte
  • week
  • yard
  • year

StyleOption2:

  • long
  • short
  • narrow