     
     ///Attempts to parse a string to a date using one of the common variations on ISO8601 date time
     class func tryParseISO8601LikeDateString(_ date:String) -> Date? {
-        for precision in ISO8601ExtendedPrecision.allValues {
+        for precision in ISO8601ExtendedPrecision.allCases {
             let formatter:DateFormatter = cachedISO8601DateTimeFormatter(ofPrecision: precision)
             if let result = formatter.date(from: date) {
                 return result

    }
    
    ///Return cached ISO8601 date formatter for thread safe operation, assumes >iOS7 || >OSX10.9+64bit
    class func cachedISO8601DateTimeFormatter(ofPrecision precision:ISO8601ExtendedPrecision = .conforming) -> DateFormatter {
        let formatterKey:String = "com.cyberdev.ISO8601Formatter.\(precision.rawValue)"
        if let formatter:DateFormatter = formatterCache[formatterKey] {
            return formatter

    //MARK: - ISO 8601 Utilities
    static fileprivate var formatterCache:[String:DateFormatter] = [:]
    
    enum ISO8601ExtendedPrecision:Int,CaseIterable {
        case seconds, milliseconds, microseconds
        case java, windows
        
        static var allCases: [ISO8601ExtendedPrecision] {
            return [seconds, milliseconds, microseconds]
        }
    }
    
    /**
