swift-formatstyle

Installation
SKILL.md

Swift FormatStyle (iOS / macOS)

Locale-aware, value-to-string formatting (and string-to-value parsing) built on Foundation's FormatStyle protocol. This is the modern, type-safe replacement for NumberFormatter, DateFormatter, DateComponentsFormatter, and friends — prefer it for all new code.

  • Baseline availability: FormatStyle, number/date/list/measurement/person-name styles are iOS 15+. Duration styles (.units / .time) and the FormatStyle-based ByteCountFormatStyle (.byteCount) are iOS 16+.
  • KMP boundary: keep the numeric value (a Decimal, Date, or Money) in shared code; format only at the iOS presentation layer. Never hand a Double across the boundary for money — see kmp-money.
  • Two entry points, equivalent:
    • value.formatted(style) — call on the value.
    • style.format(value) — call on the style (useful when the style is stored/reused).

Contents

Installs
4
GitHub Stars
12
First Seen
Aug 23, 2026
swift-formatstyle — talissonvitorino/kmp-ios-skills