ESTTimePeriod

@interface ESTTimePeriod : NSObject <NSCopying>

ESTTimePeriod represents time interval using two time points. Can be used for time intervals of reoccuring events without a concrete absolute time.

Start time later than end time is allowed. In that situation, the object represents interval spanning across adjacent days.

  • Time interval starting bound. Can be later than the end time.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) ESTTime *_Nonnull startTime;

    Swift

    var startTime: ESTTime { get }
  • Time interval ending bound. Can be before the start time.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) ESTTime *_Nonnull endTime;

    Swift

    var endTime: ESTTime { get }
  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStartTime:(nonnull ESTTime *)startTime
                                      endTime:(nonnull ESTTime *)endTime;

    Swift

    init(start startTime: ESTTime, end endTime: ESTTime)

    Parameters

    startTime

    Time interval starting bound.

    endTime

    Time interval ending bound.

    Return Value

    Initialized object.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStartTimeSeconds:(NSUInteger)startTimeSeconds
                                      endTimeSeconds:(NSUInteger)endTimeSeconds;

    Swift

    init(startTimeSeconds: UInt, endTimeSeconds: UInt)

    Parameters

    startTimeSeconds

    Time interval starting bound in seconds.

    endTimeSeconds

    Time interval ending bound in seconds.

    Return Value

    Initialized object.