An NSFormatter subclass for Cocoa to parse and generate ISO 8601 date strings, supporting calendar, week, and ordinal formats.
ISO 8601 Date Formatter is an Objective-C library that provides an NSFormatter subclass for parsing and generating date strings according to the ISO 8601 standard. It solves the problem of inconsistent and ambiguous date representations by offering a reliable, standards-compliant tool integrated with Cocoa's Foundation framework. The library handles calendar dates, week dates, and ordinal dates, with full support for time zones and fractional seconds.
macOS and iOS developers working with date serialization, especially those building applications that exchange date data with web services, APIs, or other systems requiring ISO 8601 compliance.
Developers choose this library because it is a mature, battle-tested implementation of ISO 8601 that integrates seamlessly with Cocoa's existing date ecosystem (NSDate, NSCalendar). It offers greater flexibility and correctness than NSDateFormatter for ISO 8601, including support for week/ordinal formats and configurable strict parsing.
A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Handles all three ISO 8601 styles—calendar, week, and ordinal dates—with time zones and fractional seconds, ensuring full standard compliance.
Offers lenient parsing with sensible defaults for missing components and an optional strict mode for validation, adapting to various input qualities.
Correctly manages daylight saving time and explicit time zones in strings, providing precise date conversions as highlighted in the version history fixes.
Includes thread-safe time zone caching and automatic cache purging on memory warnings in iOS, with noted speed improvements in updates.
Seamlessly works with NSDate and NSCalendar, making it a natural drop-in for existing macOS and iOS apps without major refactoring.
Cannot parse dates from substrings within larger text, only from the start of the string, as admitted in the bugs section, which restricts flexibility.
Lacks support for ISO 8601 date intervals or ranges, a known limitation that may require workarounds for certain data exchange needs.
Written in Objective-C without ARC (Automatic Reference Counting) by default, adding complexity for Swift projects or modern memory management.
Relies on a mix of make-based and incomplete XCTest tests, as noted in the README, which could hinder contribution and reliability verification.