RSDDateRangeObject
public struct RSDDateRangeObject : RSDDateRange, Codable
RSDDateRangeObject is a concrete implementation of a RSDDateRange that defines the range of values appropriate
for a date data type.
-
The maximum allowed date. When the value of this property is
nil, then theallowFutureproperty is checked fornil, otherwiseallowFutureis ignored.Declaration
Swift
public let maxDate: Date? -
Whether or not the UI should allow future dates. If
nilor ifminDateis defined then this value is ignored. Default istrue.Declaration
Swift
public let allowFuture: Bool? -
Whether or not the UI should allow past dates. If
nilor ifmaxDateis defined then this value is ignored. Default istrue.Declaration
Swift
public let allowPast: Bool? -
The minute interval to allow for a time picker. A time picker will default to 1 minute if this is
nilor if the number is outside the allowable range of 1 to 30 minutes.Declaration
Swift
public let minuteInterval: Int? -
The date encoder to use for formatting the result. If
nilthen the result,minDate, andmaxDateare assumed to be used for time and date with the default coding implementation.Declaration
Swift
public let dateCoder: RSDDateCoder? -
Default initializer.
Declaration
Swift
public init(minimumDate: Date?, maximumDate: Date?, allowFuture: Bool? = nil, allowPast: Bool? = nil, minuteInterval: Int? = nil, dateCoder: RSDDateCoder? = nil)Parameters
minimumDateThe minimum allowed date.
maximumDateThe maximum allowed date.
allowFutureWhether or not the UI should allow future dates.
allowPastWhether or not the UI should allow past dates.
minuteIntervalThe minute interval to allow for a time picker.
dateCoderThe date encoder to use for formatting the result.
-
Initialize from a
Decoder.Throws
DecodingErrorDeclaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to use to decode this instance.
-
Encode the object to the given encoder.
Throws
EncodingErrorDeclaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderThe encoder to use to encode this instance.
View on GitHub
RSDDateRangeObject Structure Reference