Skip to content

Commit f34a2f3

Browse files
committed
Implement copy() in ISO8601DateFormatter.
1 parent 4919d43 commit f34a2f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/Foundation/ISO8601DateFormatter.swift

+7
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ open class ISO8601DateFormatter : Formatter, NSSecureCoding {
112112
aCoder.encode(timeZone._nsObject, forKey: "NS.timeZone")
113113
}
114114
}
115+
116+
open override func copy(with zone: NSZone? = nil) -> Any {
117+
let copied = ISO8601DateFormatter()
118+
copied.timeZone = timeZone
119+
copied.formatOptions = formatOptions
120+
return copied
121+
}
115122

116123
public static var supportsSecureCoding: Bool { return true }
117124

0 commit comments

Comments
 (0)