Replies: 1 comment 1 reply
-
Hi Dennis,
Formatjs uses the Intl API, so the ability to format numeric ranges is
already available.
Thanks,
Long Ho
β¦On Tue, Aug 20, 2024 at 10:17β―PM Dennis Torres ***@***.***> wrote:
For example, one can format a numeric range using the Intl.NumberFormat
object like so:
const formatter = new Intl.NumberFormat("en-US", {
currency: "USD",
maximumFractionDigits: 0,
style: "currency",});
// => "$3 β $5"console.log(formatter.formatRange(3, 5));
Is there a way to do something similar with formatjs?
β
Reply to this email directly, view it on GitHub
<#4492>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABQM3ZSTAFC5LSCOWWWFT3ZSNMZNAVCNFSM6AAAAABM2EKPZGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGA3TKNJRGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, one can format a numeric range using the
Intl.NumberFormat
object like so:Is there a way to do something similar with formatjs?
Beta Was this translation helpful? Give feedback.
All reactions