Skip to content

Commit

Permalink
Document formatNumber()
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed Apr 14, 2023
1 parent e8f4c21 commit 9192057
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,18 @@ import { useLocale } from 'solid-compose';
const [locale, { setNumberFormat }] = useLocale();
```

`formatNumber` allows to format a number according to the current locale's number formatting setting.

```typescript
import { formatNumber, useLocale } from 'solid-compose';
const [locale, { setNumberFormat }] = useLocale();
setNumberFormat(NumberFormat.SpaceComma);
formatNumber(1000.01) // 1 000,01
```

### Date format

`setDateFormat` allows to change the date format:
Expand Down

0 comments on commit 9192057

Please sign in to comment.