Skip to content

Commit 855adee

Browse files
committed
Fix for Linux/Android
1 parent 0221022 commit 855adee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/JSONDecoder.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,10 @@ private func decodeDateFromJSON(
828828
let formatter = ISO8601DateFormatter()
829829
if let date = formatter.date(from: value) { return date }
830830
}
831+
#if !os(Linux) && !os(Android)
831832
case let .formatted(formatter):
832833
if case let .string(value) = json, let date = formatter.date(from: value) { return date }
834+
#endif
833835
case let .custom(block):
834836
return try block(JSONDecoderImpl(
835837
codingPath: path,

0 commit comments

Comments
 (0)