Context
Prices, percentages, compact values, timestamps, and dates must be consistent
and ready for users outside the default locale.
Scope
- Add presentation helpers built on
Intl.NumberFormat and Intl.DateTimeFormat.
- Cover price, token amount, percentage, compact number, date, time, and relative time.
- Define explicit fallback behavior for invalid input and unavailable data.
- Keep raw financial calculation outside formatting helpers.
Acceptance criteria
- Callers can provide locale and currency without changing calculation precision.
- Negative zero is normalized for display.
- Very small values have a documented less-than display strategy.
- Server and client output remain hydration-safe for the configured locale.
- Tests cover at least two locales, large/small values, negative zero, and invalid input.
Out of scope
- Translating application copy.
- Currency conversion or exchange-rate fetching.
Context
Prices, percentages, compact values, timestamps, and dates must be consistent
and ready for users outside the default locale.
Scope
Intl.NumberFormatandIntl.DateTimeFormat.Acceptance criteria
Out of scope