#intl Clear
Tags #utils #browser #performance #array #async #dom #objects #pattern #events #format #concurrency #http #ui #advanced #fetch #url #string #functional #cache #files #crypto #promise #intl #observer
JavaScript Format Currency
Formats a number as a locale-aware currency string using the built-in Intl.NumberFormat API. Supports any ISO 4217 currency code and any BCP 47 locale tag. No external library required — handles symbol placement, thousands separators, and decimal places automatically per locale rules.
JavaScript Format Relative Time
Returns a human-readable relative time string ("3 days ago", "in 2 hours") using the Intl.RelativeTimeFormat API. Automatically selects the most appropriate unit (seconds, minutes, hours, days, weeks, months, years) based on the elapsed time. Fully localised — pass any BCP 47 locale.