1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import Foundation
- public extension DateFormatter {
- convenience init(withFormat format : String, locale : String) {
- self.init()
- self.locale = Locale(identifier: locale)
- dateFormat = format
- }
- }
- open class ISO8601DateTransform: DateFormatterTransform {
-
- static let reusableISODateFormatter = DateFormatter(withFormat: "yyyy-MM-dd'T'HH:mm:ssZZZZZ", locale: "en_US_POSIX")
- public init() {
- super.init(dateFormatter: ISO8601DateTransform.reusableISODateFormatter)
- }
- }
|