DateGenerator
A dependency that generates a date.
struct DateGenerator
See date
for more information.
A dependency that generates a date.
struct DateGenerator
See date
for more information.
import Dependencies
A dependency management library inspired by SwiftUI’s “environment.”
var date: DateGenerator { get set }
A dependency that returns the current date.
protocol Sendable
init(_ generate: @escaping () -> Date)
Initializes a date generator that generates a date from a closure.
static func constant(_ now: Date) -> DateGenerator
A generator that returns a constant date.
var now: Date { get set }
The current date.
func callAsFunction() -> Date