AFSwiftDateExtension 是 iOS NSDate 扩展,能使 NSDate相关操作更简单,它依靠 SWIFT 顶层函数建立,有更好的体验和安全性。
NSDate
特性:
Compare dates using common compare operators: >, >=, <, <=
>, >=, <, <=
Get interval between dates using that custom operator >-<
>-<
Add/remove date components by using aritmethic operators: +, -, +=, -=
+, -, +=, -=
Curryed functions
Use subscripting to access single or group of date components
要求:
iOS7 or above
Swift 1.2