Skip to content

DS-072: Centralize locale-aware number and date presentation #472

Description

@IbrahimIjai

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.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions