         
         return dateFormatterISO8601
     }
+    
+    ///Return cached ISO8601 date formatter for thread safe operation
+    class func ISO8601FormatterForThread(precision:ISO8601ExtendedPrecision = .conforming) -> NSDateFormatter {
+        let formatterKey:String = "com.cyberdev.ISO8601Formatter.\(precision.rawValue)"
+        
+        if let formatter:NSDateFormatter = NSThread.currentThread().threadDictionary[formatterKey] as? NSDateFormatter {
+            return formatter
+        } else {
+            let formatter:NSDateFormatter = ISO8601Formatter(precision)
+            NSThread.currentThread().threadDictionary[formatterKey] = formatter
+            return formatter
+        }
+    }
+    
+    ///Attempts to parse a string to a date using one of the common variations on ISO8601
+    class func tryParseISO8601LikeDateString(date:String) -> NSDate? {
+        for precision in ISO8601ExtendedPrecision.allValues {
+            let formatter:NSDateFormatter = ISO8601FormatterForThread(precision)
+            if let result = formatter.dateFromString(date) {
+                return result
+            }
+        }
+        
+        return nil
+    }
 }
        let dateFormatterISO8601 = NSDateFormatter()
        dateFormatterISO8601.locale = NSLocale(localeIdentifier: "en_US_POSIX")
        
        switch precision {
        case .conforming:
            dateFormatterISO8601.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"

import Foundation

extension NSDateFormatter {
    enum ISO8601ExtendedPrecision:Int {
        case conforming, milliseconds, microseconds
        case java, windows
        
        static let allValues = [conforming, milliseconds, microseconds]
    }
    
    /**
