I’ve mentioned a number of Swift helper libraries such as Dollar.$wift which provides a functional programming toolbelt inspired by Underscore.js and Asterism.
Here’s a library providing an extensive date helper that extends NSDate providing dozens of new functions for setting, comparing, adjusting, printing, calculating intervals, and decomposing dates into their components.
This example from the readme shows off the date from string functionality of the library:
NSDate(fromString: "16 July 1972 6:12:00 ", format: .Custom("dd MMM yyyy HH:mm:ss")) -> NSDate
// Date from ISO8601 String
NSDate(fromString: "1972-07-16T08:15:30-05:00", format: .ISO8601) -> NSDate
// Date from DotNetJSON String
NSDate(fromString: "/Date(1260123281843)/", format: .DotNet) -> NSDate
// Date from RSS String
NSDate(fromString: "Fri, 09 Sep 2011 15:26:08 +0200", format: .RSS) -> NSDate
// Date from AltRSS String
NSDate(fromString: "09 Sep 2011 15:26:08 +0200", format: .AltRSS) -> NSDate -> NSDate
You can find AFDateHelper on Github here.
A great library for working with dates.
- Open Source Functional Programming Toolbelt For Swift Inspired By The Underscore.js Library
- Library For Working With Dates Providing Helpers For Formatting, Parsing, Validation And Manipulation
- Extensive Swift Utility Library Inspired By Python’s Standard Library
- Extensive Open Source Swift Based Core Data Wrapper With A MagicalRecord And Linq Inspired Syntax
- An Extensive Open Source iOS Library For Working With The Twitter API Written In Swift
Original article: Extensive Swift Based Helper Library For Working With Dates
©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.




