ShiftTime

@objc(ZDShiftTime)
public final class ShiftTime : NSObject

Represents a particular day and time in a weekly schedule, The shift time is represented in 24 hour time format.

  • Represents the day of the week, range: [1-7]

    Declaration

    Swift

    @objc
    public var dayOfWeek: ZendriveDayOfWeek
  • Represents the hour of the day. range: [0-23].

    Declaration

    Swift

    @objc
    public var hour: Int
  • Represents the minute of the hour. range: [0-59].

    Declaration

    Swift

    @objc
    public var minute: Int
  • initializes the ShiftTime object. Example

    let shiftTime = ShiftTime(dayOfWeek: .sunday, hour: 11, minute: 40)
    

    Declaration

    Swift

    @objc
    public convenience init(dayOfWeek: ZendriveDayOfWeek, hour: Int, minute: Int)
  • Converts the ShiftDetail object to ZendriveShiftDetail object.

    Declaration

    Swift

    @objc
    public func toObjcShiftTime() -> ZendriveShiftTime
  • Converts the ShiftTime object to dictionary Example:

    ["day_of_week": "Sunday",
    "hour": 11,
    "minute": 59
    ]
    

    Declaration

    Swift

    @objc
    public func toDictionary() -> [String : Any]?