Skip to content

Commit 18c129d

Browse files
committed
Renamed DateTimeCoding to RFC5322DateTimeCoding
1 parent e7eea00 commit 18c129d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/AWSLambdaEvents/SES.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public enum SES {
4949
public struct CommonHeaders: Decodable {
5050
public let bcc: [String]?
5151
public let cc: [String]?
52-
@DateTimeCoding public var date: Date
52+
@RFC5322DateTimeCoding public var date: Date
5353
public let from: [String]
5454
public let messageId: String
5555
public let returnPath: String?

Sources/AWSLambdaEvents/Utils/DateWrappers.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public struct ISO8601WithFractionalSecondsCoding: Decodable {
7171
}
7272

7373
@propertyWrapper
74-
public struct DateTimeCoding: Decodable {
74+
public struct RFC5322DateTimeCoding: Decodable {
7575
public let wrappedValue: Date
7676

7777
public init(wrappedValue: Date) {
@@ -83,7 +83,7 @@ public struct DateTimeCoding: Decodable {
8383
let dateString = try container.decode(String.self)
8484
guard let date = Self.dateFormatter.date(from: dateString) else {
8585
throw DecodingError.dataCorruptedError(in: container, debugDescription:
86-
"Expected date to be in date-time format with fractional seconds, but `\(dateString)` does not forfill format")
86+
"Expected date to be in RFC5322 date-time format with fractional seconds, but `\(dateString)` does not forfill format")
8787
}
8888
self.wrappedValue = date
8989
}

0 commit comments

Comments
 (0)