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) -> IntParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
-1 if
left < right, 0 ifleft == right, or 1 ifleft > right. -
Compare this dayTimeDuration with another dayTimeDuration.
Declaration
Swift
open func compareTo(_ value: DayTimeDuration) -> IntParameters
valueThe 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() -> DataValueReturn Value
A clone of this value if it (together with all value subcomponents) is possibly mutable, or return
selfvalue 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?) -> BoolParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
trueifleftis equal toright, otherwisefalse. -
Compare this dayTimeDuration value with another dayTimeDuration value.
Declaration
Swift
override open func equals(_ other: AnyObject?) -> BoolParameters
otherThe 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) -> BoolParameters
valueThe other dayTimeDuration value.
Return Value
trueif this dayTimeDuration value is greater than or equal to the value dayTimeDuration value. Oherwisefalse. -
Compare two dayTimeDuration values.
Declaration
Swift
open class func greaterEqual(_ left: DayTimeDuration, _ right: DayTimeDuration) -> BoolParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
trueifleftis greater than or equal toright, otherwisefalse. -
Compare this dayTimeDuration value with another dayTimeDuration value.
Declaration
Swift
open func greaterThan(_ value: DayTimeDuration) -> BoolParameters
valueThe other dayTimeDuration value.
Return Value
trueif this dayTimeDuration value is greater than the value dayTimeDuration value. Oherwisefalse. -
Compare two dayTimeDuration values.
Declaration
Swift
open class func greaterThan(_ left: DayTimeDuration, _ right: DayTimeDuration) -> BoolParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
trueifleftis greater thanright, otherwisefalse. -
Hash this data value to a number.
Declaration
Swift
override open func hashCode() -> IntReturn 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) -> BoolParameters
valueThe other dayTimeDuration value.
Return Value
trueif this dayTimeDuration value is less than or equal to the value dayTimeDuration value. Oherwisefalse. -
Compare two dayTimeDuration values.
Declaration
Swift
open class func lessEqual(_ left: DayTimeDuration, _ right: DayTimeDuration) -> BoolParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
trueifleftis less than or equal toright, otherwisefalse. -
Compare this dayTimeDuration value with another dayTimeDuration value.
Declaration
Swift
open func lessThan(_ value: DayTimeDuration) -> BoolParameters
valueThe other dayTimeDuration value.
Return Value
trueif this dayTimeDuration value is less than the value dayTimeDuration value. Oherwisefalse. -
Compare two dayTimeDuration values.
Declaration
Swift
open class func lessThan(_ left: DayTimeDuration, _ right: DayTimeDuration) -> BoolParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
trueifleftis less thanright, otherwisefalse. -
Declaration
Swift
open class func literal(_ text: String) -> DayTimeDurationParameters
textValue in XML Schema format.
Return Value
Value parsed from XML Schema format, or panic if
texthas invalid duration format. Useparseif thetextis 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() -> DayTimeDurationReturn 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
equalto this value. -
Compare this dayTimeDuration value with another dayTimeDuration value.
Declaration
Swift
open func notEqual(_ value: DayTimeDuration) -> BoolParameters
valueThe other dayTimeDuration value.
Return Value
trueif this dayTimeDuration value is not equal to the value dayTimeDuration value. Oherwisefalse. -
Compare two dayTimeDuration values.
Declaration
Swift
open class func notEqual(_ left: DayTimeDuration?, _ right: DayTimeDuration?) -> BoolParameters
leftThe first dayTimeDuration for comparison.
rightThe second dayTimeDuration for comparison.
Return Value
trueifleftis not equal toright, otherwisefalse. -
Declaration
Swift
open class func of(sign: Int, days: Int, hours: Int, minutes: Int, seconds: Int, nanos: Int = (0 as Int)) -> DayTimeDurationParameters
signThe sign field (+1, 0 or -1).
daysThe days field (non-negative).
hoursThe hours field (non-negative).
minutesThe minutes field (non-negative).
secondsThe seconds field (non-negative).
nanosThe nanos field (non-negative,
<= 999999999).Return Value
A new day/time duration.
-
Declaration
Swift
open class func ofDecimal(seconds: BigDecimal) -> DayTimeDurationParameters
secondsDuration expressed as decimal seconds with optional fraction.
Return Value
A new day/time duration.
-
Declaration
Swift
open class func ofDouble(seconds: Double) -> DayTimeDurationParameters
secondsDuration expressed as seconds with double precision.
Return Value
A new day/time duration.
-
Declaration
Swift
open class func parse(_ text: String) -> DayTimeDuration?Parameters
textValue in XML Schema format.
Return Value
Value parsed from XML Schema format, or
niliftexthas 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() -> BigDecimalReturn Value
Duration expressed as decimal seconds with optional fraction.
-
Declaration
Swift
open func toDouble() -> DoubleReturn Value
Duration expressed as seconds with double precision.
-
Convert this data value to a string. If the
dataTypeis 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() -> StringReturn Value
Lexical representation of this data value.