|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.jdc.dts.Date
Class Date represents a date. Date provides operations
date manipulation and formatting. Note: Month value is 1-based, not 0-based like
the Java Calendar class.
Calendar,
Date| Nested Class Summary | |
class |
Date.Format
Class Format contains constants representing various date
format style patterns. |
| Constructor Summary | |
Date()
Constructs a new Date object for the current date and time. |
|
Date(Locale locale)
Constructs a new Date object for the specified Locale. |
|
| Method Summary | |
String |
format()
Returns a formatted String representation of this Date
object using the default format. |
String |
format(int style)
Returns a formatted String representation of this Date
object in the specified style. |
Calendar |
getCalendar()
Returns the Java Calendar object for this Date object. |
Date |
getDate()
Returns the Java Date object for this Date object. |
int |
getDay()
Returns the integer day value this Date object. |
String |
getMessage()
Returns the appropriate message text for an invalid date. |
int |
getMonth()
Returns the integer month value this Date object. |
long |
getTime()
Returns the long value this Date object. |
int |
getYear()
Returns the integer year value this Date object. |
int |
intValue()
Converts this Date to an int. |
boolean |
isDate()
Returns true if the value represented by this Date
object is a valid date. |
boolean |
isValid()
Returns true if the value represented by this Date
object is within a specified date range. |
static void |
main(String[] args)
Executes the unit tests for the Date class. |
Date |
set(Calendar calendar)
Sets the values for this Date object based on a Java
Calendar object. |
Date |
set(Date date)
Sets the value for this Date object based on a Java
Date object. |
Date |
set(String date)
Sets the value for this Date object based on a String
date value. |
Date |
setStrict()
Sets the flag to enforce strict parsing of a String date value. |
String |
toLongFormat()
Returns a long format String representation of this Date object. |
String |
toShortFormat()
Returns a short format String representation of this Date object. |
String |
toString()
Returns a String representation of this Date object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Date()
Date object for the current date and time.
public Date(Locale locale)
Date object for the specified Locale.
| Method Detail |
public String format()
String representation of this Date
object using the default format.
String representation of this Date object.public String format(int style)
String representation of this Date
object in the specified style.
String representation of this Date object.public Calendar getCalendar()
Calendar object for this Date object.
Calendar object for this Date object.public Date getDate()
Date object for this Date object.
Date object for this Date object.public int getDay()
Date object.
Date object.public String getMessage()
public int getMonth()
Date object.
Date object.public long getTime()
Date object.
Date object.public int getYear()
Date object.
Date object.public int intValue()
Date to an int.
int.public boolean isDate()
true if the value represented by this Date
object is a valid date.
True if the value is a valid date.
False if the value is not a valid date.public boolean isValid()
true if the value represented by this Date
object is within a specified date range.
True if the value is within the specified date range.
False if the value is not within the specified date range.public Date set(Calendar calendar)
Date object based on a Java
Calendar object.
Date object.public Date set(Date date)
Date object based on a Java
Date object.
Date object.public Date set(String date)
Date object based on a String
date value.
Date object.public Date setStrict()
String date value.
Date object.public String toLongFormat()
String representation of this Date object.
String representation of this Datel object.public String toShortFormat()
String representation of this Date object.
String representation of this Date object.public String toString()
String representation of this Date object.
toString in class ObjectString representation of this Date object.public static void main(String[] args)
|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||