LocalTime
open class LocalTime : DataValue, @unchecked Sendable
Represents the XML Schema time type without zone offset.
-
Declaration
Swift
public static func from(utc time: Date, in timeZone: TimeZone = GMT) -> LocalTimeParameters
utcUTC-based point in time.
timeZoneTime zone in which the local time will be determined (defaults to GMT). Use
TimeZone.currentfor the local time zone.Return Value
Local time equivalent of UTC-based point in time.
-
Compare two time values.
Declaration
Swift
open class func compare(_ left: LocalTime, _ right: LocalTime) -> IntParameters
leftThe first time for comparison.
rightThe second time for comparison.
Return Value
-1 if
left < right, 0 ifleft == right, or 1 ifleft > right. -
Compare this time with another time.
Declaration
Swift
open func compareTo(_ value: LocalTime) -> IntParameters
valueThe other time value.
Return Value
-1 if this time is less than the value time, 0 if they are equal, 1 if this time is greater than the value time.
-
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 } -
Compare two time values.
Declaration
Swift
open class func equal(_ left: LocalTime?, _ right: LocalTime?) -> BoolParameters
leftThe first time for comparison.
rightThe second time for comparison.
Return Value
trueifleftis equal toright, otherwisefalse. -
Compare this time value with another time value.
Declaration
Swift
override open func equals(_ other: AnyObject?) -> BoolParameters
otherThe other time value.
Return Value
True, if this time value is equal to the value time value. Otherwise
false. -
Compare this time value with another time value.
Declaration
Swift
open func greaterEqual(_ value: LocalTime) -> BoolParameters
valueThe other time value.
Return Value
trueif this time value is greater than or equal to the value time value. Oherwisefalse. -
Compare two time values.
Declaration
Swift
open class func greaterEqual(_ left: LocalTime, _ right: LocalTime) -> BoolParameters
leftThe first time for comparison.
rightThe second time for comparison.
Return Value
trueifleftis greater than or equal toright, otherwisefalse. -
Compare this time value with another time value.
Declaration
Swift
open func greaterThan(_ value: LocalTime) -> BoolParameters
valueThe other time value.
Return Value
trueif this time value is greater than the value time value. Oherwisefalse. -
Compare two time values.
Declaration
Swift
open class func greaterThan(_ left: LocalTime, _ right: LocalTime) -> BoolParameters
leftThe first time for comparison.
rightThe second time 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 time value with another time value.
Declaration
Swift
open func lessEqual(_ value: LocalTime) -> BoolParameters
valueThe other time value.
Return Value
trueif this time value is less than or equal to the value time value. Oherwisefalse. -
Compare two time values.
Declaration
Swift
open class func lessEqual(_ left: LocalTime, _ right: LocalTime) -> BoolParameters
leftThe first time for comparison.
rightThe second time for comparison.
Return Value
trueifleftis less than or equal toright, otherwisefalse. -
Compare this time value with another time value.
Declaration
Swift
open func lessThan(_ value: LocalTime) -> BoolParameters
valueThe other time value.
Return Value
trueif this time value is less than the value time value. Oherwisefalse. -
Compare two time values.
Declaration
Swift
open class func lessThan(_ left: LocalTime, _ right: LocalTime) -> BoolParameters
leftThe first time for comparison.
rightThe second time for comparison.
Return Value
trueifleftis less thanright, otherwisefalse. -
Declaration
Swift
open class func literal(_ text: String) -> LocalTimeParameters
textValue in XML Schema format.
Return Value
Value parsed from XML Schema format, or panic if
texthas invalid time format. Useparseif thetextis not guaranteed to be in the correct format. -
Declaration
Swift
open func minus(_ value: LocalTime) -> DoubleParameters
valueThe other time value.
Return Value
The difference
this - value, measured in days. -
Minute field of time (0 to 59).
Declaration
Swift
open var minute: Int { get } -
Nanosecond field of time (0 to 999999999).
Declaration
Swift
open var nano: Int { get } -
Compare this time value with another time value.
Declaration
Swift
open func notEqual(_ value: LocalTime) -> BoolParameters
valueThe other time value.
Return Value
trueif this time value is not equal to the value time value. Oherwisefalse. -
Compare two time values.
Declaration
Swift
open class func notEqual(_ left: LocalTime?, _ right: LocalTime?) -> BoolParameters
leftThe first time for comparison.
rightThe second time for comparison.
Return Value
trueifleftis not equal toright, otherwisefalse. -
Declaration
Swift
open class func now() -> LocalTimeReturn Value
The current local time.
-
Declaration
Swift
open class func of(hour: Int, minute: Int, second: Int, nano: Int = (0 as Int)) -> LocalTimeParameters
hourThe hour field (0 to 24). If the
houris 24 then all the other parameters must be 0. This represents a day duration (PT24H).minuteThe minute field (0 to 59).
secondThe second field (0 to 59).
nanoThe nano field (0 to 999999999).
Return Value
A new time value.
-
Declaration
Swift
open class func parse(_ text: String) -> LocalTime?Parameters
textValue in XML Schema format.
Return Value
Value parsed from XML Schema format, or
niliftexthas invalid time format. -
Declaration
Swift
open func plusHours(_ hours: Int64) -> LocalTimeParameters
hoursNumber of hours to add. Can be negative, zero or positive.
Return Value
A new time which is the specified number of hours ahead of this time.
-
Declaration
Swift
open func plusMicros(_ micros: Int64) -> LocalTimeParameters
microsNumber of microseconds to add. Can be negative, zero or positive.
Return Value
A new time which is the specified number of microseconds ahead of this time.
-
Declaration
Swift
open func plusMillis(_ millis: Int64) -> LocalTimeParameters
millisNumber of milliseconds to add. Can be negative, zero or positive.
Return Value
A new time which is the specified number of milliseconds ahead of this time.
-
Declaration
Swift
open func plusMinutes(_ minutes: Int64) -> LocalTimeParameters
minutesNumber of minutes to add. Can be negative, zero or positive.
Return Value
A new time which is the specified number of minutes ahead of this time.
-
Declaration
Swift
open func plusNanos(_ nanos: Int64) -> LocalTimeParameters
nanosNumber of nanoseconds to add. Can be negative, zero or positive.
Return Value
A new time which is the specified number of nanoseconds ahead of this time.
-
Declaration
Swift
open func plusSeconds(_ seconds: Int64) -> LocalTimeParameters
secondsNumber of seconds to add. Can be negative, zero or positive.
Return Value
A new time which is the specified number of seconds ahead of this time.
-
Second field of time (0 to 59).
Declaration
Swift
open var second: 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.