DayTimeDuration

open class DayTimeDuration: DataValue

Represents the XML Schema dayTimeDuration type.

  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func compare(_ left: DayTimeDuration, _ right: DayTimeDuration) -> Int

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    -1 if left < right, 0 if left == right, or 1 if left > right.

  • Compare this dayTimeDuration with another dayTimeDuration.

    Declaration

    Swift

    open func compareTo(_ value: DayTimeDuration) -> Int

    Parameters

    value

    The other dayTimeDuration.

    Return Value

    -1 if this dayTimeDuration is less than the value dayTimeDuration, 0 if they are equal, 1 if this dayTimeDuration is greater than the value dayTimeDuration.

  • Data type of the wrapped value.

    Declaration

    Swift

    override open var dataType: DataType
  • Days field of duration (non-negative).

    Declaration

    Swift

    open var days: Int
  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func equal(_ left: DayTimeDuration?, _ right: DayTimeDuration?) -> Bool

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    true if left is equal to right, otherwise false.

  • Compare this dayTimeDuration value with another dayTimeDuration value.

    Declaration

    Swift

    override open func equals(_ value: AnyObject?) -> Bool

    Parameters

    value

    The other dayTimeDuration value.

    Return Value

    True, if this dayTimeDuration value is equal to the value dayTimeDuration value. Otherwise false.

  • Compare this dayTimeDuration value with another dayTimeDuration value.

    Declaration

    Swift

    open func greaterEqual(_ value: DayTimeDuration) -> Bool

    Parameters

    value

    The other dayTimeDuration value.

    Return Value

    true if this dayTimeDuration value is greater than or equal to the value dayTimeDuration value. Oherwise false.

  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func greaterEqual(_ left: DayTimeDuration, _ right: DayTimeDuration) -> Bool

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    true if left is greater than or equal to right, otherwise false.

  • Compare this dayTimeDuration value with another dayTimeDuration value.

    Declaration

    Swift

    open func greaterThan(_ value: DayTimeDuration) -> Bool

    Parameters

    value

    The other dayTimeDuration value.

    Return Value

    true if this dayTimeDuration value is greater than the value dayTimeDuration value. Oherwise false.

  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func greaterThan(_ left: DayTimeDuration, _ right: DayTimeDuration) -> Bool

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    true if left is greater than right, otherwise false.

  • Hash this data value to a number.

    Declaration

    Swift

    override open func hashCode() -> Int

    Return Value

    Any value in the range of type int.

  • Hours field of duration (non-negative).

    Declaration

    Swift

    open var hours: Int
  • Compare this dayTimeDuration value with another dayTimeDuration value.

    Declaration

    Swift

    open func lessEqual(_ value: DayTimeDuration) -> Bool

    Parameters

    value

    The other dayTimeDuration value.

    Return Value

    true if this dayTimeDuration value is less than or equal to the value dayTimeDuration value. Oherwise false.

  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func lessEqual(_ left: DayTimeDuration, _ right: DayTimeDuration) -> Bool

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    true if left is less than or equal to right, otherwise false.

  • Compare this dayTimeDuration value with another dayTimeDuration value.

    Declaration

    Swift

    open func lessThan(_ value: DayTimeDuration) -> Bool

    Parameters

    value

    The other dayTimeDuration value.

    Return Value

    true if this dayTimeDuration value is less than the value dayTimeDuration value. Oherwise false.

  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func lessThan(_ left: DayTimeDuration, _ right: DayTimeDuration) -> Bool

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    true if left is less than right, otherwise false.

  • Minutes field of duration (non-negative).

    Declaration

    Swift

    open var minutes: Int
  • Nanoseconds field of duration (non-negative).

    Declaration

    Swift

    open var nanos: Int
  • Declaration

    Swift

    open func normalize() -> DayTimeDuration

    Return Value

    An equivalent value with all fields normalized. The result value will have nanos < 1000000000, seconds < 60, minutes < 60, hours < 24. The result value will be equal to this value.

  • Compare this dayTimeDuration value with another dayTimeDuration value.

    Declaration

    Swift

    open func notEqual(_ value: DayTimeDuration) -> Bool

    Parameters

    value

    The other dayTimeDuration value.

    Return Value

    true if this dayTimeDuration value is not equal to the value dayTimeDuration value. Oherwise false.

  • Compare two dayTimeDuration values.

    Declaration

    Swift

    open class func notEqual(_ left: DayTimeDuration?, _ right: DayTimeDuration?) -> Bool

    Parameters

    left

    The first dayTimeDuration for comparison.

    right

    The second dayTimeDuration for comparison.

    Return Value

    true if left is not equal to right, otherwise false.

  • Declaration

    Swift

    open class func of(sign: Int, days: Int, hours: Int, minutes: Int, seconds: Int, nanos: Int) -> DayTimeDuration

    Parameters

    sign

    The sign field (+1, 0 or -1).

    days

    The days field (non-negative).

    hours

    The hours field (non-negative).

    minutes

    The minutes field (non-negative).

    seconds

    The seconds field (non-negative).

    nanos

    The nanos field (non-negative, <= 999999999).

    Return Value

    A new day/time duration.

  • Declaration

    Swift

    open class func parse(_ text: String) -> DayTimeDuration?

    Parameters

    text

    Value in XML Schema format.

    Return Value

    Value parsed from XML Schema format, or nil if text has invalid duration format.

  • Seconds field of duration (non-negative).

    Declaration

    Swift

    open var seconds: Int
  • Sign of the duration (+1, 0 or -1).

    Declaration

    Swift

    open var sign: Int
  • Convert this data value to a string. If the dataType is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).

    Declaration

    Swift

    override open func toString() -> String

    Return Value

    Lexical representation of this data value.