Reference
Format
Format, dressed in the paper-and-ink system: Intl formatting for numbers, currency, bytes and relative time. The parts — Number, Byte, Time, RelativeTime.
#Byte
| Prop | Type | Default | Description |
|---|---|---|---|
unit | 'bit' | 'byte' | The unit granularity to display | |
unitDisplay | 'long' | 'short' | 'narrow' | The unit display | |
unitSystem | 'decimal' | 'binary' | The unit system to use for formatting | |
value | number | The byte size to format |
#Number
| Prop | Type | Default | Description |
|---|---|---|---|
compactDisplay | 'short' | 'long' | undefined | — | |
currencyDisplay | string | undefined | — | |
currencySign | string | undefined | — | |
notation | 'standard' | 'scientific' | 'engineering' | 'compact' | undefined | — | |
signDisplay | 'auto' | 'never' | 'always' | 'exceptZero' | undefined | — | |
unit | string | undefined | — | |
unitDisplay | 'short' | 'long' | 'narrow' | undefined | — | |
value | number | The byte size to format |
#RelativeTime
| Prop | Type | Default | Description |
|---|---|---|---|
localeMatcher | Intl.RelativeTimeFormatLocaleMatcher | The locale matching algorithm to use. For information about this option, see Intl page. | |
numeric | Intl.RelativeTimeFormatNumeric | The format of output message. | |
style | Intl.RelativeTimeFormatStyle | The length of the internationalized message. | |
value | Date | The date to format |
#Time
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | Date | The time to format |