SMIBusinessHoursInfo

Objective-C

@protocol SMIBusinessHoursInfo

Swift

protocol BusinessHoursInfo

The information needed to determine a deployment’s business hours.

  • The name of the business hours in Setup.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *_Nonnull name;

    Swift

    var name: String { get }
  • Determines if the business hours are active.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isActive) BOOL active;

    Swift

    var isActive: Bool { get }
  • A list of SMIBusinessHours representing intervals across a 24-hour period.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSArray<id<SMIBusinessHours>> *_Nonnull businessHours;

    Swift

    var businessHours: [BusinessHours] { get }
  • Current request timestamp of the business hours request.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDate *_Nonnull requestTimestamp;

    Swift

    unowned(unsafe) var requestTimestamp: NSDate { get }
  • Determines if the user is currently within the set business hours.

    Declaration

    Objective-C

    - (BOOL)isWithinBusinessHours:(nullable NSDate *)comparisonTime;

    Swift

    func isWithinBusinessHours(comparisonTime: Date?) -> Bool

    Parameters

    comparisonTime

    Used to check if the time current time is within business hours.