js-intl-format.js
const money = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" });
const euros = new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" });
const date = new Intl.DateTimeFormat("en-GB", { dateStyle: "medium" });
const ago = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
console.log(money.format(1234.5)); // $1,234.50
console.log(euros.format(1234.5)); // 1.234,50 €
console.log(date.format(new Date(2026, 9, 21)));
console.log(ago.format(-1, "day")); // yesterday