{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-currency-formatting-be4336d75cfd","title":"Use Intl APIs for Currency, Number, and Date Formatting","summary":"Format currency, numbers, and dates using Intl APIs to ensure internationalization (i18n) and avoid hardcoded values. This includes delivering locale-specific formatting for monetary values, dates, and sorting\/searching operations.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-currency-formatting-be4336d75cfd","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-currency-formatting-be4336d75cfd","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-currency-formatting-be4336d75cfd.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-currency-formatting-be4336d75cfd\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the user locale is explicitly passed to Intl APIs rather than relying on the browser's default. Prepare input values in a format compatible with Intl.NumberFormat and Intl.DateTimeFormat, and handle fallback locales when the requested locale is unavailable.","instructions":"---\nname: currency-formatting\ndescription: \"Use when reviewing utility functions, component props, or template strings that format numbers, prices, or dates to check whether Intl APIs are used correctly.\"\nmetadata:\n  category: i18n\n  priority: medium\n  difficulty: beginner\n  estimatedTime: \"20\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/i18n\/currency-formatting\n---\n\n# Use Intl APIs for currency, number, and date formatting\n\nNumber and currency formatting rules differ significantly across locales \u2014 a value formatted as \"$1,234.56\" in the US is written \"1.234,56 $\" in Germany and \"\u00a51,235\" in Japan. Hardcoded formatting causes incorrect display for international users and is expensive to maintain manually as you add locales.\n\n## Quick Reference\n\n- Never hardcode currency symbols or thousand separators like $ or comma\n- Use Intl.NumberFormat with the currency style for monetary values\n- Use Intl.DateTimeFormat for locale-aware date and time display\n- Pass the user locale explicitly rather than relying on the browser default\n- Use Intl.Collator and locale fallback chains for sorting and searching\n\n## Check\n\nIdentify all places in this codebase where numbers, currencies, or dates are formatted manually instead of using Intl.NumberFormat or Intl.DateTimeFormat. Also flag locale-sensitive sorting that uses plain string comparison instead of Intl.Collator and any formatter that lacks a fallback locale.\n\n## Fix\n\nReplace manual number and currency formatting with Intl.NumberFormat and replace manual date formatting with Intl.DateTimeFormat, passing the user locale explicitly. Use Intl.Collator for locale-aware sorting and resolve a supported fallback locale when the requested locale is unavailable.\n\n## Explain\n\nExplain why locale-aware formatting with Intl APIs is required for international applications, what goes wrong when formatting is hardcoded, and why sorting\/searching should also use locale-aware comparison.\n\n## Code Review\n\nReview utility functions and components that render numbers, prices, percentages, or dates. Flag any hardcoded currency symbols, separators, or date format strings, and show Intl-based alternatives.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/i18n\/currency-formatting\n","use_cases":["Formatting currency values like USD, EUR, or JPY for international users","Displaying localized dates and times based on user locale","Sorting and searching strings using locale-aware comparison"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/currency-formatting\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-23","created_at":"2026-11-22T15:46:56.000000Z","updated_at":"2026-11-23T04:54:56.000000Z","seo_title":"Use Intl APIs for Currency Formatting","seo_description":"Ensure internationalization by using Intl APIs for currency, number, and date formatting instead of hardcoded values.","seo_keywords":["currency formatting","internationalization","locale-aware formatting","Intl.NumberFormat","date formatting"]}}