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

**URL:** <https://community.homey.app/t/app-pro-better-logic-library-for-users/71876>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, logic, bll\
**Created:** [November 7, 2022, 10:13pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876 "2022-11-07T22:13:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [November 10, 2022, 10:35am UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/5 "2022-11-10T10:35:32Z")

</div>

# 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

---

_[View the full topic](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876)._
