|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.interfaceware.chameleon.ChameleonDateTime
public class ChameleonDateTime
This class handles Date Time objects.
DblDate
Constructor Summary | |
---|---|
ChameleonDateTime()
Construct a ChameleonDateTime object. |
|
ChameleonDateTime(DblDate Value)
Construct a ChameleonDateTime object with the specified DblDate. |
|
ChameleonDateTime(long Handle)
Construct a ChameleonDateTime object with the specified long Date Time handle. |
|
ChameleonDateTime(java.lang.String dateString)
Construct a ChameleonDateTime object by parsing a string to produce a date. |
Method Summary | |
---|---|
protected void |
finalize()
Finalizer that invokes the release method. |
java.lang.String |
format(java.lang.String FormatString)
Return the date as a string using the format string passed according to the formatting rules for the ANSI C strftime function. |
protected long |
handle()
Get the Date Time handle for the class object. |
boolean |
isNull()
Check whether the ChameleonDateTime object is empty. |
static ChameleonDateTime |
now()
Get the current Date Time to the nearest millisecond of the system clock. |
short |
offsetInMinutes()
Get the time zone offset in minutes as a short integer. |
short |
offsetIsDefined()
Get the flag indicating whether the time zone offset is defined on thie CHMdateTime |
void |
release()
Free the ChameleonDateTime object handle. |
void |
setOffsetInMinutes(short Value,
short IsDefined)
Set the time zone offset in minutes For example, pass in -5*60 for a time in the EST. |
void |
setValue(DblDate Value)
Set the Date Time value with the specified DblDate. |
void |
setZone(short Zone)
Set the time zone with the specified short integer. |
java.lang.String |
toString()
Convert the Date Time value of the ChameleonDateTime object to a String. |
DblDate |
value()
Get the Date Time value. |
short |
zone()
Get the time zone as a short integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChameleonDateTime() throws ChameleonException
ChameleonException
public ChameleonDateTime(long Handle) throws ChameleonException
ChameleonException
public ChameleonDateTime(DblDate Value) throws ChameleonException
ChameleonException
public ChameleonDateTime(java.lang.String dateString) throws ChameleonException
System.setProperty(chameleon.date.format, "yyyyMMdd"); ChameleonDateTime dt = new ChameleonDateTime("20010203");Or set the date format in the call to java:
> java -Dchameleon.date.format=yyyyMMdd
ChameleonException
DateFormat.parse(java.lang.String)
Method Detail |
---|
public static ChameleonDateTime now() throws ChameleonException
ChameleonException
DblDate.now()
public void release() throws ChameleonException
ChameleonException
protected void finalize() throws ChameleonException
finalize
in class java.lang.Object
ChameleonException
public DblDate value() throws ChameleonException
ChameleonException
public void setValue(DblDate Value) throws ChameleonException
ChameleonException
public short zone() throws ChameleonException
ChameleonException
public short offsetInMinutes() throws ChameleonException
ChameleonException
public short offsetIsDefined() throws ChameleonException
ChameleonException
public void setZone(short Zone) throws ChameleonException
ChameleonException
public void setOffsetInMinutes(short Value, short IsDefined) throws ChameleonException
ChameleonException
public boolean isNull() throws ChameleonException
ChameleonException
public java.lang.String format(java.lang.String FormatString) throws ChameleonException
strftime
function.
For example, if you want 19/01/2007 to be formatted as Jan. 19, 2007, you would use
"%b. %d, %Y" for FormatString
.
ChameleonException
public java.lang.String toString()
toString
in class java.lang.Object
protected long handle()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |