public class IlrDate extends IlrTimeZone
http://www.w3.org/TR/xmlschema-2/#date).EQUAL, GREATER, LOWER| Constructor and Description |
|---|
IlrDate()
Builds a new date without any time zone.
|
IlrDate(java.util.Date date)
Builds an
IlrDate from a date instance. |
IlrDate(java.util.Date date,
java.util.TimeZone timeZone)
Builds an
IlrDate given a date and a time zone instance. |
IlrDate(long l)
Builds an
IlrDate from a long. |
IlrDate(java.lang.String str)
Builds an
IlrDate from a string. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IlrDate date)
Determines if two dates are equal.
|
boolean |
equals(java.lang.Object obj) |
short |
getCentury()
Gets the century of the date.
|
short |
getDay()
Gets the day of the date.
|
short |
getMonth()
Gets the month of the date.
|
short |
getYear()
Gets the year of the date between 0 and 99.
|
int |
hashCode() |
boolean |
isEqual(IlrDate dt)
Determines if two dates are equal.
|
boolean |
isPositive()
Determines if the date is positive.
|
static IlrDate |
parse(java.lang.String str)
Creates an
IlrDate from a string. |
void |
set(java.util.Date date)
Sets an
IlrDate from a Date instance, without
any time zone. |
void |
set(java.util.Date date,
java.util.TimeZone timeZone)
Sets the
IlrDdate with a Date and a time zone
information. |
void |
setCentury(short century)
Sets the century of the date.
|
void |
setDate(short century,
short year,
short month,
short day)
Sets the date as century/year/month/day.
|
void |
setDay(short day)
Sets the day of the date.
|
void |
setMonth(short month)
Sets the month of the date.
|
void |
setPositive(boolean positive)
Sets the sign of the date.
|
void |
setYear(short year)
Sets the year of the date.
|
java.util.Date |
toDate()
Converts the
IlrDate to a java.util.Date. |
java.lang.String |
toString() |
static IlrDate |
valueOf(java.lang.String str)
Creates an
IlrDate from a string. |
formatToString, formatToString, getTimeZoneInMillis, getZoneHour, getZoneMinute, isEqual, isUTC, isZonePositive, setTimeZone, setTimeZoneInMillis, setUTC, toTimeZone, unsetUTCpublic IlrDate()
public IlrDate(java.util.Date date)
IlrDate from a date instance.public IlrDate(java.util.Date date,
java.util.TimeZone timeZone)
IlrDate given a date and a time zone instance.public IlrDate(java.lang.String str)
throws IlrDateFormatException
IlrDate from a string.IlrDateFormatExceptionpublic IlrDate(long l)
IlrDate from a long.l - The long parameterpublic void set(java.util.Date date)
IlrDate from a Date instance, without
any time zone.public void set(java.util.Date date,
java.util.TimeZone timeZone)
IlrDdate with a Date and a time zone
information.public void setPositive(boolean positive)
public void setDate(short century,
short year,
short month,
short day)
century - The century of the date. The year 1914 has 19 as century.year - The year of the date. The year 1914 has 14 as year.month - The month of the date, 1 for January.public void setCentury(short century)
public void setYear(short year)
public void setMonth(short month)
public void setDay(short day)
public boolean isPositive()
public short getCentury()
public short getYear()
public short getMonth()
public short getDay()
public java.util.Date toDate()
throws IlrDateFormatException
IlrDate to a java.util.Date.IlrDateFormatExceptionpublic java.lang.String toString()
toString in class IlrTimeZonepublic boolean isEqual(IlrDate dt)
IlrDate to Date and comparing them.public boolean equals(java.lang.Object obj)
equals in class IlrTimeZonepublic int compareTo(IlrDate date)
IlrDate to Date and comparing them.public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public static IlrDate parse(java.lang.String str) throws IlrDateFormatException
IlrDate from a string.IlrDateFormatException - When the format is not valid.public static IlrDate valueOf(java.lang.String str)
IlrDate from a string.IlrDateFormatException - When the format is not valid.© Copyright IBM Corp. 1987, 2017