-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from drekka/develop
Adding support for date strings.
- Loading branch information
Showing
18 changed files
with
406 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "cwlcatchexception", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/mattgallagher/CwlCatchException.git", | ||
"state" : { | ||
"revision" : "3ef6999c73b6938cc0da422f2c912d0158abb0a0", | ||
"version" : "2.2.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "cwlpreconditiontesting", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", | ||
"state" : { | ||
"revision" : "2ef56b2caf25f55fa7eef8784c30d5a767550f54", | ||
"version" : "2.2.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "nimble", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/quick/nimble", | ||
"state" : { | ||
"revision" : "eb5e3d717224fa0d1f6aff3fc2c5e8e81fa1f728", | ||
"version" : "11.2.2" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// CustomISO8601Day.swift | ||
// | ||
// | ||
// Created by Derek Clarkson on 9/1/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Identifies a ``Day`` property that reads and writes from date strings using a configured ``DateFormatter``. | ||
@propertyWrapper | ||
public struct DateString<T, Configurator>: Codable where T: DateStringCodable, Configurator: DateStringConfigurator { | ||
|
||
public var wrappedValue: T | ||
|
||
public init(wrappedValue: T) { | ||
self.wrappedValue = wrappedValue | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
wrappedValue = try T(dateDecoder: decoder, configurator: Configurator.self) | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
try wrappedValue.encode(dateEncoder: encoder, configurator: Configurator.self) | ||
} | ||
} |
Oops, something went wrong.