Function: formatCentsRange()
function formatCentsRange(
min: NumberInput,
max: NumberInput,
locale?: string
): string | null;Defined in: shared/datatable/lib/format.ts:181
Format a monetary range given in MINOR units — cents. 10000, 50000 renders
$100.00 – $500.00. Note the unit differs from formatCurrency.
Returns null rather than "" when neither bound is set, so a caller can map
"nothing to show" onto its own placeholder.
Parameters
| Parameter | Type | Default value |
|---|---|---|
min | NumberInput | undefined |
max | NumberInput | undefined |
locale | string | DEFAULT_LOCALE |
Returns
string | null