Skip to content

Commit

Permalink
make date formatter utilities public
Browse files Browse the repository at this point in the history
  • Loading branch information
JARMourato committed Jun 21, 2021
1 parent 56c7b55 commit 6d8f825
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Wrappers/CodableDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public enum DateCodingStrategy {
case rfc3339
case timestamp

internal func date(from value: String) -> Date? {
public func date(from value: String) -> Date? {
switch self {
case let .format(format): return DateCodingStrategy.getFormatter(format).date(from: value)
case .iso8601: return DateCodingStrategy.iso8601Formatter.date(from: value)
Expand All @@ -87,7 +87,7 @@ public enum DateCodingStrategy {
}
}

internal func string(from date: Date) -> String {
public func string(from date: Date) -> String {
switch self {
case let .format(format): return DateCodingStrategy.getFormatter(format).string(from: date)
case .iso8601: return DateCodingStrategy.iso8601Formatter.string(from: date)
Expand Down

0 comments on commit 6d8f825

Please sign in to comment.