RVS_CalendarInputDateItemProtocol
public protocol RVS_CalendarInputDateItemProtocol
This protocol defines the basic structure of one item of the stored data. All properties are required.
-
The year, as an integer.
Declaration
Swift
var year: Int { get set }
-
The month, as an integer (1 -> 12).
Declaration
Swift
var month: Int { get set }
-
The day of the month (1 -> [28|29|30|31]), as an integer.
Declaration
Swift
var day: Int { get set }
-
True, if the item is enabled for selection.
Declaration
Swift
var isEnabled: Bool { get set }
-
True, if the item is currently selected.
Declaration
Swift
var isSelected: Bool { get set }
-
Reference context. This is how we attach arbitrary data to the item.
Declaration
Swift
var refCon: Any? { get set }
-
date
Default implementationReturn the date item state as a date. OPTIONAL
Default Implementation
This returns the instance as a standard Foundation Date. It may be nil. The calendar used, will be the current one.
Declaration
Swift
var date: Date? { get }
-
dateComponents
Default implementationReturn the date item state as date components. OPTIONAL
Default Implementation
This returns the instance as a standard Foundation DateComponents instance. The calendar used, will be the current one.
Declaration
Swift
var dateComponents: DateComponents? { get }
-
dateSortKey
Default implementationThis allows us to sort the data by the date. It returns a simple int, which is useful for sorting.
Default Implementation
The default returns a simple int, which is a sum of the various date components (YYYYMMDD).
Declaration
Swift
var dateSortKey: Int { get }