Modifier and Type | Method and Description |
---|---|
static LocalDate |
castOptional(DataValue value)
For internal use only.
|
static LocalDate |
castRequired(DataValue value)
For internal use only.
|
static int |
compare(LocalDate left,
LocalDate right)
Compare two date values.
|
int |
compareTo(LocalDate value)
Compare this date with another date.
|
static boolean |
equal(LocalDate left,
LocalDate right)
Compare two date values.
|
boolean |
equals(java.lang.Object value)
Compare this date value with another date value.
|
static LocalDate |
from(java.time.LocalDate jd)
Convert from java.time.LocalDate.
|
DataType |
getDataType()
Return data type of the wrapped value.
|
int |
getDay()
Return day field of date (1 to 31).
|
int |
getDayOfWeek()
Return day of week (1 to 7).
|
int |
getDayOfYear()
Return day of year (1 to 366).
|
int |
getMonth()
Return month field of date (1 to 12).
|
int |
getYear()
Return year field of date.
|
boolean |
greaterEqual(LocalDate value)
Compare this date value with another date value.
|
boolean |
greaterThan(LocalDate value)
Compare this date value with another date value.
|
int |
hashCode()
Hash this data value to a number.
|
boolean |
lessEqual(LocalDate value)
Compare this date value with another date value.
|
boolean |
lessThan(LocalDate value)
Compare this date value with another date value.
|
double |
minus(LocalDate value)
Return the difference
this - value , measured in days. |
boolean |
notEqual(LocalDate value)
Compare this date value with another date value.
|
static LocalDate |
now()
Return the current local date.
|
static LocalDate |
of(int year,
int month,
int day)
Return a new date value.
|
static LocalDate |
parse(java.lang.String text)
|
LocalDate |
plusDays(int days)
Return a new date which is the specified number of days ahead of this date.
|
LocalDate |
plusMonths(int months)
Return a new date which is which is the specified number of months ahead of this date.
|
LocalDate |
plusWeeks(int weeks)
Return a new date which is which is the specified number of weeks ahead of this date.
|
LocalDate |
plusYears(int years)
Return a new date which is which is the specified number of years ahead of this date.
|
static boolean |
static_greaterEqual(LocalDate left,
LocalDate right)
Compare two date values.
|
static boolean |
static_greaterThan(LocalDate left,
LocalDate right)
Compare two date values.
|
static boolean |
static_lessEqual(LocalDate left,
LocalDate right)
Compare two date values.
|
static boolean |
static_lessThan(LocalDate left,
LocalDate right)
Compare two date values.
|
static boolean |
static_notEqual(LocalDate left,
LocalDate right)
Compare two date values.
|
java.time.LocalDate |
toJavaTime()
Convert to java.time.LocalDate.
|
java.lang.String |
toString()
Convert this data value to a string.
|
cloneMutable, getTypeCode
public static LocalDate from(java.time.LocalDate jd)
jd
- Java date value.public java.time.LocalDate toJavaTime()
public static LocalDate castOptional(DataValue value)
For internal use only.
value
- (internal use only)public static LocalDate castRequired(DataValue value)
For internal use only.
value
- (internal use only)public static int compare(LocalDate left, LocalDate right)
Compare two date values.
left
- The first date for comparison.right
- The second date for comparison.left < right
, 0 if left == right
, or 1 if left > right
.public int compareTo(LocalDate value)
Compare this date with another date.
value
- The other date.public static boolean equal(LocalDate left, LocalDate right)
Compare two date values.
left
- (nullable) The first date for comparison.right
- (nullable) The second date for comparison.true
if left
is equal to right
, otherwise false
.public boolean equals(java.lang.Object value)
Compare this date value with another date value.
public DataType getDataType()
Return data type of the wrapped value.
getDataType
in class DataValue
public int getDay()
Return day field of date (1 to 31).
public int getDayOfWeek()
Return day of week (1 to 7).
public int getDayOfYear()
Return day of year (1 to 366).
public int getMonth()
Return month field of date (1 to 12).
public int getYear()
Return year field of date.
public boolean greaterEqual(LocalDate value)
Compare this date value with another date value.
value
- The other date value.true
if this date value is greater than or equal to the value date value. Oherwise false
.public boolean greaterThan(LocalDate value)
Compare this date value with another date value.
value
- The other date value.true
if this date value is greater than the value date value. Oherwise false
.public int hashCode()
Hash this data value to a number.
public boolean lessEqual(LocalDate value)
Compare this date value with another date value.
value
- The other date value.true
if this date value is less than or equal to the value date value. Oherwise false
.public boolean lessThan(LocalDate value)
Compare this date value with another date value.
value
- The other date value.true
if this date value is less than the value date value. Oherwise false
.public double minus(LocalDate value)
Return the difference this - value
, measured in days.
value
- The other date.this - value
, measured in days.public boolean notEqual(LocalDate value)
Compare this date value with another date value.
value
- The other date value.true
if this date value is not equal to the value date value. Oherwise false
.public static LocalDate now()
Return the current local date.
public static LocalDate of(int year, int month, int day)
Return a new date value.
year
- The year field.month
- The month field (1 to 12).day
- The day field (1 to 31).public static LocalDate parse(java.lang.String text)
Return (nullable) Value parsed from XML Schema format, or null
if text
has invalid date format.
text
- Value in XML Schema format.null
if text
has invalid date format.public LocalDate plusDays(int days)
Return a new date which is the specified number of days ahead of this date.
days
- Number of days to add. Can be negative, zero or positive.public LocalDate plusMonths(int months)
Return a new date which is which is the specified number of months ahead of this date.
months
- Number of months to add. Can be negative, zero or positive.public LocalDate plusWeeks(int weeks)
Return a new date which is which is the specified number of weeks ahead of this date.
weeks
- Number of weeks to add. Can be negative, zero or positive.public LocalDate plusYears(int years)
Return a new date which is which is the specified number of years ahead of this date.
years
- Number of years to add. Can be negative, zero or positive.public static boolean static_greaterEqual(LocalDate left, LocalDate right)
Compare two date values.
left
- The first date for comparison.right
- The second date for comparison.true
if left
is greater than or equal to right
, otherwise false
.public static boolean static_greaterThan(LocalDate left, LocalDate right)
Compare two date values.
left
- The first date for comparison.right
- The second date for comparison.true
if left
is greater than right
, otherwise false
.public static boolean static_lessEqual(LocalDate left, LocalDate right)
Compare two date values.
left
- The first date for comparison.right
- The second date for comparison.true
if left
is less than or equal to right
, otherwise false
.public static boolean static_lessThan(LocalDate left, LocalDate right)
Compare two date values.
left
- The first date for comparison.right
- The second date for comparison.true
if left
is less than right
, otherwise false
.public static boolean static_notEqual(LocalDate left, LocalDate right)
Compare two date values.
left
- (nullable) The first date for comparison.right
- (nullable) The second date for comparison.true
if left
is not equal to right
, otherwise false
.public java.lang.String toString()
Convert this data value to a string.
If the LocalDate.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).