DayTimeDuration

open class DayTimeDuration : DataValue, @unchecked Sendable

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 value.

    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.

  • Declaration

    Swift

    override open func copyMutable() -> DataValue

    Return Value

    A clone of this value if it (together with all value subcomponents) is possibly mutable, or return self value if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query.

  • Data type of the wrapped value.

    Declaration

    Swift

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

    Declaration

    Swift

    open var days: Int { get }
  • 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(_ other: AnyObject?) -> Bool

    Parameters

    other

    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 { get }
  • 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.

  • Declaration

    Swift

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

    Parameters

    text

    Value in XML Schema format.

    Return Value

    Value parsed from XML Schema format, or panic if text has invalid duration format. Use parse if the text is not guaranteed to be in the correct format.

  • Minutes field of duration (non-negative).

    Declaration

    Swift

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

    Declaration

    Swift

    open var nanos: Int { get }
  • 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 = (0 as 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 ofDecimal(seconds: BigDecimal) -> DayTimeDuration

    Parameters

    seconds

    Duration expressed as decimal seconds with optional fraction.

    Return Value

    A new day/time duration.

  • Declaration

    Swift

    open class func ofDouble(seconds: Double) -> DayTimeDuration

    Parameters

    seconds

    Duration expressed as seconds with double precision.

    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 { get }
  • Sign of the duration (+1, 0 or -1).

    Declaration

    Swift

    open var sign: Int { get }
  • Declaration

    Swift

    open func toDecimal() -> BigDecimal

    Return Value

    Duration expressed as decimal seconds with optional fraction.

  • Declaration

    Swift

    open func toDouble() -> Double

    Return Value

    Duration expressed as seconds with double precision.

  • 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.