LocalDate
open class LocalDate : DataValue
Represents the XML Schema date type without zone offset.
-
Declaration
Swift
public static func from(utc date: Date, in timeZone: TimeZone = GMT) -> LocalDateParameters
utcUTC-based point in time.
timeZoneTime zone in which the local date will be determined (defaults to GMT). Use
TimeZone.currentfor the local time zone.Return Value
Local date equivalent of UTC-based point in time.
-
Compare two date values.
Declaration
Swift
open class func compare(_ left: LocalDate, _ right: LocalDate) -> IntParameters
leftThe first date for comparison.
rightThe second date for comparison.
Return Value
-1 if
left < right, 0 ifleft == right, or 1 ifleft > right. -
Compare this date with another date.
Declaration
Swift
open func compareTo(_ value: LocalDate) -> IntParameters
valueThe other date.
Return Value
-1 if this date is less than the value date, 0 if they are equal, 1 if this date is greater than the value date.
-
Data type of the wrapped value.
Declaration
Swift
override open var dataType: DataType { get } -
Day field of date (1 to 31).
Declaration
Swift
open var day: Int { get } -
Day of week (1 to 7).
See also
DayOfWeek.Declaration
Swift
open var dayOfWeek: Int { get } -
Day of year (1 to 366).
Declaration
Swift
open var dayOfYear: Int { get } -
Compare two date values.
Declaration
Swift
open class func equal(_ left: LocalDate?, _ right: LocalDate?) -> BoolParameters
leftThe first date for comparison.
rightThe second date for comparison.
Return Value
trueifleftis equal toright, otherwisefalse. -
Compare this date value with another date value.
Declaration
Swift
override open func equals(_ value: AnyObject?) -> BoolParameters
valueThe other date value.
Return Value
True, if this date value is equal to the value date value. Otherwise
false. -
Compare this date value with another date value.
Declaration
Swift
open func greaterEqual(_ value: LocalDate) -> BoolParameters
valueThe other date value.
Return Value
trueif this date value is greater than or equal to the value date value. Oherwisefalse. -
Compare two date values.
Declaration
Swift
open class func greaterEqual(_ left: LocalDate, _ right: LocalDate) -> BoolParameters
leftThe first date for comparison.
rightThe second date for comparison.
Return Value
trueifleftis greater than or equal toright, otherwisefalse. -
Compare this date value with another date value.
Declaration
Swift
open func greaterThan(_ value: LocalDate) -> BoolParameters
valueThe other date value.
Return Value
trueif this date value is greater than the value date value. Oherwisefalse. -
Compare two date values.
Declaration
Swift
open class func greaterThan(_ left: LocalDate, _ right: LocalDate) -> BoolParameters
leftThe first date for comparison.
rightThe second date 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 date value with another date value.
Declaration
Swift
open func lessEqual(_ value: LocalDate) -> BoolParameters
valueThe other date value.
Return Value
trueif this date value is less than or equal to the value date value. Oherwisefalse. -
Compare two date values.
Declaration
Swift
open class func lessEqual(_ left: LocalDate, _ right: LocalDate) -> BoolParameters
leftThe first date for comparison.
rightThe second date for comparison.
Return Value
trueifleftis less than or equal toright, otherwisefalse. -
Compare this date value with another date value.
Declaration
Swift
open func lessThan(_ value: LocalDate) -> BoolParameters
valueThe other date value.
Return Value
trueif this date value is less than the value date value. Oherwisefalse. -
Compare two date values.
Declaration
Swift
open class func lessThan(_ left: LocalDate, _ right: LocalDate) -> BoolParameters
leftThe first date for comparison.
rightThe second date for comparison.
Return Value
trueifleftis less thanright, otherwisefalse. -
Declaration
Swift
open func minus(_ value: LocalDate) -> DoubleParameters
valueThe other date.
Return Value
The difference
this - value, measured in days. -
Month field of date (1 to 12).
See also
MonthOfYear.Declaration
Swift
open var month: Int { get } -
Compare this date value with another date value.
Declaration
Swift
open func notEqual(_ value: LocalDate) -> BoolParameters
valueThe other date value.
Return Value
trueif this date value is not equal to the value date value. Oherwisefalse. -
Compare two date values.
Declaration
Swift
open class func notEqual(_ left: LocalDate?, _ right: LocalDate?) -> BoolParameters
leftThe first date for comparison.
rightThe second date for comparison.
Return Value
trueifleftis not equal toright, otherwisefalse. -
Declaration
Swift
open class func now() -> LocalDateReturn Value
The current local date.
-
Declaration
Swift
open class func of(year: Int, month: Int, day: Int) -> LocalDateParameters
yearThe year field.
monthThe month field (1 to 12).
dayThe day field (1 to 31).
Return Value
A new date value.
-
Declaration
Swift
open class func parse(_ text: String) -> LocalDate?Parameters
textValue in XML Schema format.
Return Value
Value parsed from XML Schema format, or
niliftexthas invalid date format. -
Declaration
Swift
open func plusDays(_ days: Int) -> LocalDateParameters
daysNumber of days to add. Can be negative, zero or positive.
Return Value
A new date which is the specified number of days ahead of this date.
-
Declaration
Swift
open func plusMonths(_ months: Int) -> LocalDateParameters
monthsNumber of months to add. Can be negative, zero or positive.
Return Value
A new date which is which is the specified number of months ahead of this date.
-
Declaration
Swift
open func plusWeeks(_ weeks: Int) -> LocalDateParameters
weeksNumber of weeks to add. Can be negative, zero or positive.
Return Value
A new date which is which is the specified number of weeks ahead of this date.
-
Declaration
Swift
open func plusYears(_ years: Int) -> LocalDateParameters
yearsNumber of years to add. Can be negative, zero or positive.
Return Value
A new date which is which is the specified number of years ahead of this date.
-
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.
-
Year field of date.
Declaration
Swift
open var year: Int { get }