ESTTime

@interface ESTTime : NSObject <NSCopying>

ESTTime is an object wrapper around seconds since midnight. Represents given time of day, measuring seconds since midnight. Useful for representing time relative to midnight.

  • Seconds since midnight.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) NSUInteger secondsSinceMidnight;

    Swift

    var secondsSinceMidnight: UInt { get }
  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSecondsSinceMidnight:(NSUInteger)seconds;

    Swift

    init(secondsSinceMidnight seconds: UInt)

    Parameters

    seconds

    Seconds since midnight.

    Return Value

    Initialized object.

  • Convenience initializer. Creates object using clock time values.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithHours:(NSUInteger)hours
                                  minutes:(NSUInteger)minutes
                                  seconds:(NSUInteger)seconds;

    Swift

    init(hours: UInt, minutes: UInt, seconds: UInt)

    Parameters

    hours

    Integer hours since midnight for a given point in time.

    minutes

    Integer minutes since midnight for a given point in time.

    seconds

    Integer seconds since midnight for a given point in time.

    Return Value

    Initialized object.

  • Convenience initializer. Creates object using clock time values. Assumes seconds are equal to 0.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithHours:(NSUInteger)hours
                                  minutes:(NSUInteger)minutes;

    Swift

    init(hours: UInt, minutes: UInt)

    Parameters

    hours

    Integer hours since midnight for a given point in time.

    minutes

    Integer minutes since midnight for a given point in time.

    Return Value

    Initialized object.