RSDWeeklyScheduleObject
public struct RSDWeeklyScheduleObject : Codable, RSDSchedule
A weekly schedule item is a light-weight codable struct that can be used to store and track events that happen at regularily scheduled intervals. This schedule assumes a ISO8601 7-day calendar.
- example:
Codable
protocol schema.let json = """ { "daysOfWeek": [1, 3, 5], "timeOfDay": "08:00" } """.data(using: .utf8)! // our data in native (JSON) format
-
The days of the week to include in the schedule. By default, this will be set to daily.
Declaration
Swift
public var daysOfWeek: Set<RSDWeekday>
-
The time of the day as a string with the format
HH:mm
.Declaration
Swift
public var timeOfDayString: String?
-
Return the current time zone.
Declaration
Swift
public var timeZone: TimeZone { get }
-
Is this a daily scheduled item?
Declaration
Swift
public var isDaily: Bool { get }
-
Get an array of the date components to use to set up notification triggers. This will return a
DateComponents
for each day of the week, unless the reminder should be posted daily.Note
The date components will not include the participant’s current timezone.Declaration
Swift
public func notificationTriggers() -> [DateComponents]
Return Value
The date components to use to set up a trigger for each scheduling instance.
-
Set the weekdays by converting from Any array.
Declaration
Swift
mutating public func setWeekdays(from value: [Any]?)
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Declaration
Swift
public static func == (lhs: RSDWeeklyScheduleObject, rhs: RSDWeeklyScheduleObject) -> Bool
-
Declaration
Swift
public static func < (lhs: RSDWeeklyScheduleObject, rhs: RSDWeeklyScheduleObject) -> Bool