YearMonthDuration
open class YearMonthDuration : DataValue
Represents the XML Schema yearMonthDuration type.
-
Compare two yearMonthDuration values.
Declaration
Swift
open class func compare(_ left: YearMonthDuration, _ right: YearMonthDuration) -> IntParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration for comparison.
Return Value
-1 if
left < right, 0 ifleft == right, or 1 ifleft > right. -
Compare this yearMonthDuration with another yearMonthDuration.
Declaration
Swift
open func compareTo(_ value: YearMonthDuration) -> IntParameters
valueThe other yearMonthDuration.
Return Value
-1 if this yearMonthDuration is less than the value yearMonthDuration, 0 if they are equal, 1 if this yearMonthDuration is greater than the value yearMonthDuration.
-
Data type of the wrapped value.
Declaration
Swift
override open var dataType: DataType { get } -
Compare two yearMonthDuration values.
Declaration
Swift
open class func equal(_ left: YearMonthDuration?, _ right: YearMonthDuration?) -> BoolParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration for comparison.
Return Value
trueifleftis equal toright, otherwisefalse. -
Compare this yearMonthDuration value with another yearMonthDuration value.
Declaration
Swift
override open func equals(_ value: AnyObject?) -> BoolParameters
valueThe other yearMonthDuration value.
Return Value
True, if this yearMonthDuration value is equal to the value yearMonthDuration value. Otherwise
false. -
Compare this yearMonthDuration value with another yearMonthDuration value.
Declaration
Swift
open func greaterEqual(_ value: YearMonthDuration) -> BoolParameters
valueThe other yearMonthDuration value.
Return Value
trueif this yearMonthDuration value is greater than or equal to the value yearMonthDuration value. Oherwisefalse. -
Compare two yearMonthDuration values.
Declaration
Swift
open class func greaterEqual(_ left: YearMonthDuration, _ right: YearMonthDuration) -> BoolParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration for comparison.
Return Value
trueifleftis greater than or equal toright, otherwisefalse. -
Compare this yearMonthDuration value with another yearMonthDuration value.
Declaration
Swift
open func greaterThan(_ value: YearMonthDuration) -> BoolParameters
valueThe other yearMonthDuration value.
Return Value
trueif this yearMonthDuration value is greater than the value yearMonthDuration value. Oherwisefalse. -
Compare two yearMonthDuration values.
Declaration
Swift
open class func greaterThan(_ left: YearMonthDuration, _ right: YearMonthDuration) -> BoolParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration 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. -
Compare this yearMonthDuration value with another yearMonthDuration value.
Declaration
Swift
open func lessEqual(_ value: YearMonthDuration) -> BoolParameters
valueThe other yearMonthDuration value.
Return Value
trueif this yearMonthDuration value is less than or equal to the value yearMonthDuration value. Oherwisefalse. -
Compare two yearMonthDuration values.
Declaration
Swift
open class func lessEqual(_ left: YearMonthDuration, _ right: YearMonthDuration) -> BoolParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration for comparison.
Return Value
trueifleftis less than or equal toright, otherwisefalse. -
Compare this yearMonthDuration value with another yearMonthDuration value.
Declaration
Swift
open func lessThan(_ value: YearMonthDuration) -> BoolParameters
valueThe other yearMonthDuration value.
Return Value
trueif this yearMonthDuration value is less than the value yearMonthDuration value. Oherwisefalse. -
Compare two yearMonthDuration values.
Declaration
Swift
open class func lessThan(_ left: YearMonthDuration, _ right: YearMonthDuration) -> BoolParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration for comparison.
Return Value
trueifleftis less thanright, otherwisefalse. -
Months field of duration (non-negative).
Declaration
Swift
open var months: Int { get } -
Declaration
Swift
open func normalize() -> YearMonthDurationReturn Value
An equivalent value with all fields normalized. The result value will have months < 12. The result value will be
equalto this value. -
Compare this yearMonthDuration value with another yearMonthDuration value.
Declaration
Swift
open func notEqual(_ value: YearMonthDuration) -> BoolParameters
valueThe other yearMonthDuration value.
Return Value
trueif this yearMonthDuration value is not equal to the value yearMonthDuration value. Oherwisefalse. -
Compare two yearMonthDuration values.
Declaration
Swift
open class func notEqual(_ left: YearMonthDuration?, _ right: YearMonthDuration?) -> BoolParameters
leftThe first yearMonthDuration for comparison.
rightThe second yearMonthDuration for comparison.
Return Value
trueifleftis not equal toright, otherwisefalse. -
Declaration
Swift
open class func of(sign: Int, years: Int, months: Int) -> YearMonthDurationParameters
signThe sign field (+1, 0 or -1).
yearsThe years field (non-negative).
monthsThe months field (non-negative).
Return Value
A new year/month duration.
-
Declaration
Swift
open class func parse(_ text: String) -> YearMonthDuration?Parameters
textValue in XML Schema format.
Return Value
Value parsed from XML Schema format, or
niliftexthas invalid duration format. -
Sign of the duration (+1, 0 or -1).
Declaration
Swift
open var sign: Int { get } -
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.
-
Years field of duration (non-negative).
Declaration
Swift
open var years: Int { get }