Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Format

Format

MITSwift0.5.0

A Swift formatter kit providing simple formatting syntax for numbers, currency, addresses, and colors.

GitHubGitHub
1.2k stars43 forks0 contributors

What is Format?

Format is a Swift formatter kit that provides a simple and intuitive API for formatting various data types in iOS and macOS applications. It solves the problem of verbose and complex formatting code by offering extensions for numbers, currency, addresses, and colors with built-in locale support.

Target Audience

iOS and macOS developers who need to format numbers, currency, addresses, or colors in their Swift applications, especially those working on internationalized apps requiring locale-aware formatting.

Value Proposition

Developers choose Format for its clean, extension-based syntax that reduces boilerplate, its comprehensive support for common formatting tasks, and its seamless integration with Swift's type system and locale handling.

Overview

A Swift Formatter Kit

Use Cases

Best For

  • Formatting currency values with locale-specific symbols and separators
  • Converting hexadecimal color strings from APIs into UIColors
  • Displaying addresses in the correct format for different countries
  • Formatting numbers with consistent decimal places or ordinal suffixes
  • Internationalizing apps with locale-aware number and distance formatting
  • Reducing boilerplate code when working with Foundation formatters

Not Ideal For

  • Projects supporting iOS versions below 9.0 that require address formatting
  • Applications needing extensive date or time formatting not covered by the kit
  • Teams prioritizing zero-deprecation warnings and strict adherence to Apple's latest APIs
  • High-performance apps where abstraction layers might introduce unnecessary overhead

Pros & Cons

Pros

Clean Extension Syntax

Provides intuitive format extensions on all number types, drastically reducing boilerplate compared to using Foundation's NumberFormatter directly.

Built-in Locale Support

Defaults to the user's current locale and allows easy customization with Locale objects, simplifying internationalization for numbers, currency, and distances.

Comprehensive Common Formats

Covers decimal numbers, currency, mass, addresses, ordinal numbers, and hex colors in one package, addressing most everyday formatting needs.

Error Handling for Colors

Color formatter defaults to black or white for invalid or empty hex strings, preventing crashes and ensuring UI stability.

Cons

Deprecated Address APIs

The address formatting function relies on CLPlacemark's addressDictionary with deprecated AddressBook keys, causing warnings and potential future breakage.

Limited Data Type Coverage

Does not support formatting for dates or times, common in apps, forcing developers to use separate solutions like DateFormatter.

iOS Version Constraints

Address formatting is only available for iOS 9.0+, making it unsuitable for apps that need to support older versions without workarounds.

Frequently Asked Questions

Quick Stats

Stars1,175
Forks43
Contributors0
Open Issues4
Last commit8 years ago
CreatedSince 2015

Tags

#formatting#ios#number-formatting#currency-formatting#localization#address-formatting#cocoapods#swift#macos

Built With

S
Swift

Included in

iOS51.7k
Auto-fetched 1 day ago

Related Projects

YYTextYYText

Powerful text framework for iOS to display and edit rich text.

Stars8,862
Forks1,845
Last commit2 years ago
NimbusNimbus

The iOS framework that grows only as fast as its documentation

Stars6,402
Forks1,269
Last commit2 years ago
DTCoreTextDTCoreText

Methods to allow using HTML code with CoreText

Stars6,391
Forks1,180
Last commit3 months ago
PhoneNumberKitPhoneNumberKit

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.

Stars5,392
Forks850
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub