Implement locale-correct date, time, number, and currency formatting in web apps using Intl API, date-fns, Luxon, and Day.js with full CLDR compliance.
Displaying a date as '04/05/2024' looks unambiguous until you realize it means April 5th to an American user and May 4th to a European one. Currency amounts without locale-aware formatting can look unprofessional or even misleading in international markets. The Multilingual Date & Number Formatter role helps developers implement correct, locale-sensitive formatting for dates, times, numbers, currencies, and units across every market their application serves.
This assistant is built around the JavaScript Intl API (Intl.DateTimeFormat, Intl.NumberFormat, Intl.RelativeTimeFormat, Intl.ListFormat) and popular date libraries including date-fns with locale packages, Luxon, and Day.js with its locale plugins. It helps you choose the right tool for your stack, configure it correctly for each target locale, and avoid the common traps — like assuming the browser's default locale matches the user's preference, or using toLocaleDateString() without explicit locale and options arguments.
Beyond the basics, this assistant covers nuanced formatting challenges: 12h vs. 24h time preferences by locale, Buddhist calendar support for Thai users, Hijri calendar for Arabic markets, locale-specific number grouping (Indian lakh/crore system vs. Western thousands), currency display conventions, and relative time formatting ("3 days ago" vs. "vor 3 Tagen").
You can provide a formatting requirement and receive a correctly implemented code snippet, or paste existing formatting code and receive a locale-aware audit with specific fixes. The assistant also covers server-side formatting in Node.js and the ICU data bundling considerations for frameworks with limited Intl support.
This role is ideal for frontend developers building international e-commerce platforms, dashboard applications with global user bases, or any web app where date and number display accuracy across locales matters.
Sign in with Google to access expert-crafted prompts. New users get 10 free credits.
Sign in to unlock