|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.xml.types.IlrTimeZone ilog.rules.xml.types.IlrDate
public class IlrDate
This class represents the simple type "date" of the W3C XML Schema
Recommendation (http://www.w3.org/TR/xmlschema-2/#date
).
Field Summary |
---|
Fields inherited from class ilog.rules.xml.types.IlrTimeZone |
---|
EQUAL, GREATER, LOWER |
Constructor Summary | |
---|---|
IlrDate()
Builds a new date without any time zone. |
|
IlrDate(Date date)
Builds an IlrDate from a date instance. |
|
IlrDate(Date date,
TimeZone timeZone)
Builds an IlrDate given a date and a time zone instance. |
|
IlrDate(long l)
Builds an IlrDate from a long. |
|
IlrDate(String str)
Builds an IlrDate from a string. |
Method Summary | |
---|---|
int |
compareTo(IlrDate date)
Determines if two dates are equal. |
boolean |
equals(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(String str)
Creates an IlrDate from a string. |
void |
set(Date date)
Sets an IlrDate from a Date instance, without
any time zone. |
void |
set(Date date,
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. |
Date |
toDate()
Converts the IlrDate to a java.util.Date . |
String |
toString()
|
static IlrDate |
valueOf(String str)
Creates an IlrDate from a string. |
Methods inherited from class ilog.rules.xml.types.IlrTimeZone |
---|
formatToString, formatToString, getTimeZoneInMillis, getZoneHour, getZoneMinute, isEqual, isUTC, isZonePositive, setTimeZone, setTimeZoneInMillis, setUTC, toTimeZone, unsetUTC |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IlrDate()
public IlrDate(Date date)
IlrDate
from a date instance.
public IlrDate(Date date, TimeZone timeZone)
IlrDate
given a date and a time zone instance.
public IlrDate(String str) throws IlrDateFormatException
IlrDate
from a string.
IlrDateFormatException
public IlrDate(long l)
IlrDate
from a long.
l
- The long parameterMethod Detail |
---|
public void set(Date date)
IlrDate
from a Date
instance, without
any time zone.
public void set(Date date, 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 Date toDate() throws IlrDateFormatException
IlrDate
to a java.util.Date
.
IlrDateFormatException
public String toString()
toString
in class IlrTimeZone
public boolean isEqual(IlrDate dt)
IlrDate
to Date
and comparing them.
public boolean equals(Object obj)
equals
in class IlrTimeZone
public int compareTo(IlrDate date)
IlrDate
to Date
and comparing them.
public int hashCode()
hashCode
in class Object
Object.hashCode()
public static IlrDate parse(String str) throws IlrDateFormatException
IlrDate
from a string.
IlrDateFormatException
- When the format is not valid.public static IlrDate valueOf(String str)
IlrDate
from a string.
IlrDateFormatException
- When the format is not valid.
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |