mirror of
https://github.com/heyman/heynote.git
synced 2024-11-24 17:03:19 +01:00
parent
387ef33f94
commit
b368810ecc
@ -92,6 +92,13 @@ _format = format # store reference to the built in format
|
|||||||
format(x) = _format(x, {notation:"exponential"})
|
format(x) = _format(x, {notation:"exponential"})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also do something like this to show the number with your default locale or providing a [custom one](https://www.w3.org/International/articles/language-tags/):
|
||||||
|
|
||||||
|
```
|
||||||
|
format(x) = x.toLocaleString();
|
||||||
|
format(x) = x.toLocaleString('en-GB');
|
||||||
|
```
|
||||||
|
|
||||||
See the [Math.js format()](https://mathjs.org/docs/reference/functions/format.html) function for more info on what's supported.
|
See the [Math.js format()](https://mathjs.org/docs/reference/functions/format.html) function for more info on what's supported.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user