Cosmo
Locale-aware formatting for JavaScript, PHP, Python, Java & C#.
Production-ready and stable. Format money, dates, numbers, units and text the way each of your users expects — essential for any app that shows data to people. One ergonomic API, five languages, and zero bundled locale data.
Implemented in — JavaScript · PHP · Python · Java · C#
Backed by all of ICU — nothing curated away
Every value comes straight from your runtime's ICU / CLDR data. A sense of the scale you get for free:
From the everyday — US dollars, the Gregorian calendar, New York time, Latin script — to the long tail: the Persian and Ethiopic calendars, Nepal's UTC+5:45, the Adlam and Tifinagh scripts, and Eastern-Arabic numerals (٢٠٢٠).
Zero locale data
Everything comes straight from the runtime's ICU — every country, language, script, calendar and time zone. No hardcoded tables to drift out of date.
The same API everywhere
Identical method names and signatures across JavaScript, PHP, Python, Java and C#. Learn it once; read your own language across the whole site.
Everything you display
Money, dates, numbers, units, percentages, plurals, lists, ranges, collation, transliteration and parsing — all in the locale's conventions.
Thin and honest
A light, ergonomic layer over ICU. If the runtime's ICU can't produce a result, the feature is omitted — never faked.