File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Sources/AWSLambdaEvents/Utils Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ public struct ISO8601Coding: Decodable, Sendable {
43
43
}
44
44
}
45
45
46
-
47
-
48
46
private static func parseISO8601( dateString: String ) throws -> Date {
49
47
if #available( macOS 12 . 0 , * ) {
50
48
return try Date ( dateString, strategy: . iso8601)
@@ -141,9 +139,9 @@ public struct RFC5322DateTimeCoding: Decodable, Sendable {
141
139
142
140
do {
143
141
if #available( macOS 12 . 0 , * ) {
144
- self . wrappedValue = try Date ( string, strategy: RFC5322DateParseStrategy ( ) )
142
+ self . wrappedValue = try Date ( string, strategy: Self . rfc5322DateParseStrategy )
145
143
} else {
146
- self . wrappedValue = try RFC5322DateParseStrategy ( ) . parse ( string)
144
+ self . wrappedValue = try Self . rfc5322DateParseStrategy . parse ( string)
147
145
}
148
146
} catch {
149
147
throw DecodingError . dataCorruptedError (
@@ -154,4 +152,6 @@ public struct RFC5322DateTimeCoding: Decodable, Sendable {
154
152
}
155
153
}
156
154
157
- }
155
+ private static let rfc5322DateParseStrategy = RFC5322DateParseStrategy ( calendar: Calendar ( identifier: . gregorian) )
156
+
157
+ }
You can’t perform that action at this time.
0 commit comments