Formats

Locale-aware formatting rendered by Go from Unicode CLDR, with the options and output of JavaScript's Intl. Switch language at the bottom of the page.

English
CLDR 48 (cldr-json 48.2.1)
enen-Latn-USdirection ltrnumbers latnUSDtime zone America/New_York
Numbers
Intl.NumberFormat options, formatted on the server from CLDR data.
InputOptionsResult
1234567.891{}1,234,567.891
-0.256{style: "percent", maximumFractionDigits: 1}-25.6%
1234567{notation: "compact"}1.2M
1234567{notation: "compact", compactDisplay: "long"}1.2 million
0.000123{notation: "scientific"}1.23E-4
1234567.891{notation: "engineering"}1.235E6
1234.5678{maximumSignificantDigits: 3}1,230
2.5{maximumFractionDigits: 0, roundingMode: "halfEven"}2
0{signDisplay: "exceptZero"}0
42{signDisplay: "always"}+42
7{minimumIntegerDigits: 3}007
Currency
Money is exact (integer minor units), with CLDR currency digits. Local currency: USD.
InputOptionsResult
1234.5 USD{style: "currency", currency: "USD"}$1,234.50
-1234.5 USD{…, currencySign: "accounting"}($1,234.50)
1 USD{…, currencyDisplay: "name"}1.00 US dollars
1234.5 USD{…, currencyDisplay: "name"}1,234.50 US dollars
1234.5 USD{…, currencyDisplay: "code"}USD 1,234.50
1234567 USD{…, notation: "compact"}$1.2M
9.99 USD{style: "currency", currency: "USD", currencyDisplay: "narrowSymbol"}$9.99
1234.5 JPY{style: "currency", currency: "JPY"}¥1,235
1234.5 BHD{style: "currency", currency: "BHD"}BHD 1,234.500
Dates and times
Intl.DateTimeFormat: CLDR styles, skeletons, day periods, eras and hour cycles, all for the instant in the first column, in your time zone.
InputOptionsResult
2026-07-04T15:30:45.123Z{dateStyle: "full", timeZone: "America/New_York"}Saturday, July 4, 2026
2026-07-04T15:30:45.123Z{dateStyle: "long", timeStyle: "short", timeZone: "America/New_York"}July 4, 2026 at 11:30 AM
2026-07-04T15:30:45.123Z{dateStyle: "medium", timeStyle: "medium", timeZone: "America/New_York"}Jul 4, 2026, 11:30:45 AM
2026-07-04T15:30:45.123Z{dateStyle: "short", timeStyle: "full", timeZone: "America/New_York"}7/4/26, 11:30:45 AM Eastern Daylight Time
2026-07-04T15:30:45.123Z{weekday: "long", month: "long", day: "numeric", timeZone: "America/New_York"}Saturday, July 4
2026-07-04T15:30:45.123Z{year: "numeric", month: "short", timeZone: "America/New_York"}Jul 2026
2026-07-04T15:30:45.123Z{hour: "numeric", minute: "2-digit", hour12: true, timeZone: "America/New_York"}11:30 AM
2026-07-04T15:30:45.123Z{hour: "numeric", minute: "2-digit", hourCycle: "h23", timeZone: "America/New_York"}11:30
2026-07-04T15:30:45.123Z{dayPeriod: "long", hour: "numeric", timeZone: "America/New_York"}11 in the morning
2026-07-04T15:30:45.123Z{era: "long", year: "numeric", timeZone: "America/New_York"}2026 Anno Domini
2026-07-04T15:30:45.123Z{minute: "2-digit", second: "2-digit", fractionalSecondDigits: 3, timeZone: "America/New_York"}30:45.123
Time zones
The same instant in other time zones, with CLDR zone names: specific, generic, location and offset.
InputOptionsResult
America/New_York{hour: "numeric", minute: "2-digit", timeZoneName: "long"}11:30 AM Eastern Daylight Time
Asia/Tokyo{hour: "numeric", minute: "2-digit", timeZoneName: "short"}12:30 AM GMT+9
America/New_York{hour: "numeric", minute: "2-digit", timeZoneName: "longGeneric"}11:30 AM Eastern Time
America/Los_Angeles{hour: "numeric", minute: "2-digit", timeZoneName: "shortGeneric"}8:30 AM PT
Asia/Kolkata{hour: "numeric", minute: "2-digit", timeZoneName: "shortOffset"}9:00 PM GMT+5:30
Australia/Lord_Howe{hour: "numeric", minute: "2-digit", timeZoneName: "longOffset"}2:00 AM GMT+10:30
Europe/London{hour: "numeric", minute: "2-digit", timeZoneName: "long"}4:30 PM British Summer Time
Pacific/Chatham{hour: "numeric", minute: "2-digit", timeZoneName: "long"}4:15 AM Chatham Standard Time
Date ranges
Intl.DateTimeFormat formatRange: CLDR interval formats show the shared fields once and repeat only those that differ.
InputOptionsResult
2026-07-04T15:30:45.123Z – 2026-07-04T17:00:45.123Z{hour: "numeric", minute: "2-digit", timeZone: "America/New_York"}11:30 AM – 1:00 PM
2026-07-04T15:30:45.123Z – 2026-07-04T17:00:45.123Z{dateStyle: "long", timeStyle: "short", timeZone: "America/New_York"}July 4, 2026, 11:30 AM – 1:00 PM
2026-07-04T15:30:45.123Z – 2026-07-09T15:30:45.123Z{dateStyle: "medium", timeZone: "America/New_York"}Jul 4 – 9, 2026
2026-07-04T15:30:45.123Z – 2026-08-20T15:30:45.123Z{month: "long", day: "numeric", timeZone: "America/New_York"}July 4 – August 20
2026-07-04T15:30:45.123Z – 2027-01-15T15:30:45.123Z{year: "numeric", month: "short", day: "numeric", timeZone: "America/New_York"}Jul 4, 2026 – Jan 15, 2027
Units
Intl.NumberFormat style "unit": CLDR unit patterns with plural forms, per-units and compact numbers.
InputOptionsResult
1 kilometer{style: "unit", unit: "kilometer", unitDisplay: "long"}1 kilometer
2.5 kilometer{…, unitDisplay: "long"}2.5 kilometers
88 kilometer-per-hour{unit: "kilometer-per-hour"}88 km/h
21.5 celsius{unit: "celsius"}21.5°C
512 megabyte{unit: "megabyte", unitDisplay: "narrow"}512MB
3 liter-per-kilometer{unit: "liter-per-kilometer", unitDisplay: "long"}3 liters per kilometer
1234567 meter{unit: "meter", notation: "compact", unitDisplay: "long"}1.2M meters
Relative time
Intl.RelativeTimeFormat: CLDR dateFields with plural rules; numeric "auto" uses words like yesterday.
InputOptionsResult
-1 day{numeric: "auto"}yesterday
2 day{numeric: "auto"}in 2 days
-3 hour{}3 hours ago
5 minute{style: "short"}in 5 min.
-1.5 week{style: "narrow"}1.5w ago
1 quarter{numeric: "auto"}next quarter
-10 year{}10 years ago
Lists
Intl.ListFormat: CLDR list patterns, plus the Spanish and Hebrew rules ICU applies in code.
InputOptionsResult
English · Go · htmx{type: "conjunction"}English, Go, and htmx
English · Go · htmx{type: "disjunction"}English, Go, or htmx
English · Go · htmx · Cloudflare{type: "unit", style: "narrow"}English Go htmx Cloudflare
English · Go{style: "short"}English & Go
Durations
Intl.DurationFormat, with Chrome's output for numeric units.
InputOptionsResult
1d 2h 5m 30.25s{}1 day, 2 hr, 5 min, 30 sec, 250 ms
1d 2h 5m 30.25s{style: "long"}1 day, 2 hours, 5 minutes, 30 seconds, 250 milliseconds
1d 2h 5m 30.25s{style: "narrow"}1d 2h 5m 30s 250ms
1d 2h 5m 30.25s{style: "digital", fractionalDigits: 2}1 day, 2:05:30.25
Plural rules
CLDR plural categories with the first numbers that select them.
InputOptionsResult
cardinal · one{type: "cardinal"}1
cardinal · other{type: "cardinal"}0, 2, 3, 4, 5, 0.0
ordinal · one{type: "ordinal"}1, 21, 31, 41, 51
ordinal · two{type: "ordinal"}2, 22, 32, 42, 52
ordinal · few{type: "ordinal"}3, 23, 33, 43, 53
ordinal · other{type: "ordinal"}0, 4, 5, 6, 7
Week
Intl.Locale getWeekInfo: CLDR weekData for the locale's region (1 = Monday … 7 = Sunday).
InputOptionsResult
firstDaygetWeekInfo()7
weekendgetWeekInfo()6, 7
minimalDaysCLDR weekData1