iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIDateUtil

@interface SCIDateUtil : NSObject

Helper class for work with NSDate values

  • Checks if addition is valid for specified value.

    Declaration

    Objective-C

    - (BOOL)isAdditionValid:(double)current delta:(double)delta;

    Swift

    func isAdditionValid(_ current: Double, delta: Double) -> Bool

    Parameters

    current

    The current value to add to.

    delta

    The delta value to add.

    Return Value

    YES - if addition is valid for current value.

  • Adds the delta to specified value.

    Declaration

    Objective-C

    - (double)addDelta:(double)delta toValue:(double)value;

    Swift

    func addDelta(_ delta: Double, toValue value: Double) -> Double

    Parameters

    value

    The current value.

    delta

    The delta value.

    Return Value

    The new value.

  • Checks if specified value is divisible by passed interval.

    Declaration

    Objective-C

    - (BOOL)isDate:(double)date divisibleBy:(double)dateInterval;

    Swift

    func isDate(_ date: Double, divisibleBy dateInterval: Double) -> Bool

    Parameters

    date

    The value to check.

    dateInterval

    The divider.

    Return Value

    YES - if value is divisible by date interval.

  • Rounds up specified value to date interval.

    Declaration

    Objective-C

    - (double)roundUp:(double)value withDateInterval:(double)dateInterval;

    Swift

    func roundUp(_ value: Double, withDateInterval dateInterval: Double) -> Double

    Parameters

    value

    The value to round up.

    dateInterval

    The date interval for rounding operation.

    Return Value

    The rounded value.