Skip to content
Skillpedia
Websites & UI (frontend)75k · #2805

currency-formatting

What it does

This skill checks how a website shows money, numbers and dates to people in different countries. It is for developers building sites that serve more than one region.

When to use it

  • ✓When your prices show the wrong symbol or separator for a country.
  • ✓When dates appear in a format that confuses people abroad.
  • ✓When you add a new language or region to your website.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/currency-formatting/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/currency-formatting/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you check that prices on my site display correctly for visitors in other countries?”

5 new skills a week. 1 minute to read.

How it works

The agent looks for places where numbers, prices or dates are typed out by hand. It suggests using the browser's built-in formatting tools with the visitor's language.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Use Intl APIs for currency, number, and date formatting

Number and currency formatting rules differ significantly across locales — a value formatted as "$1,234.56" in the US is written "1.234,56 $" in Germany and "¥1,235" in Japan. Hardcoded formatting causes incorrect display for international users and is expensive to maintain manually as you add locales.

Quick Reference

  • Never hardcode currency symbols or thousand separators like $ or comma
  • Use Intl.NumberFormat with the currency style for monetary values
  • Use Intl.DateTimeFormat for locale-aware date and time display
  • Pass the user locale explicitly rather than relying on the browser default
  • Use Intl.Collator and locale fallback chains for sorting and searching

Check

Identify 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.

Fix

Replace 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.

Explain

Explain 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.

Code Review

Review 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.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/i18n/currency-formatting

FAQ

Why do prices look different in other countries?

Countries use different currency symbols, decimal marks and separators. The same amount can be written in quite different ways.

Which browser tools does it use?

It suggests the Intl formatting tools that modern browsers include for numbers, currency, dates and sorting.

Should the language be set in the code?

The skill recommends passing the user's locale explicitly rather than relying on the browser default.

Details

Original description by the author

Use when reviewing utility functions, component props, or template strings that format numbers, prices, or dates to check whether Intl APIs are used correctly.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#2805
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills