|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
java.sql.Date
public class Date
This class is a wrapper around java.util.Date to allow the JDBC driver to identify the value as a SQL Date.
Constructor Summary | |
---|---|
Date(int year,
int month,
int day)
Deprecated. |
|
Date(long date)
This method initializes a new instance of this class with the specified time value representing the number of milliseconds since Jan 1, 1970 at 12:00 midnight GMT. |
Method Summary | |
---|---|
int |
getHours()
Deprecated. |
int |
getMinutes()
Deprecated. |
int |
getSeconds()
Deprecated. |
void |
setHours(int newValue)
Deprecated. |
void |
setMinutes(int newValue)
Deprecated. |
void |
setSeconds(int newValue)
Deprecated. |
String |
toString()
This method returns this date in JDBC format. |
static Date |
valueOf(String str)
This method returns a new instance of this class by parsing a date in JDBC format into a Java date. |
Methods inherited from class java.util.Date |
---|
after, before, clone, compareTo, equals, getDate, getDay, getMonth, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setMonth, setTime, setYear, toGMTString, toLocaleString, UTC |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Date(int year, int month, int day)
year
- The year of this date minue 1900.month
- The month of this date (0-11).day
- The day of this date (1-31).public Date(long date)
date
- The time value to intialize this date to.Method Detail |
---|
public int getHours() throws IllegalArgumentException
getHours
in class Date
IllegalArgumentException
- when it's called.Calendar
,
Date.setHours(int)
public int getMinutes() throws IllegalArgumentException
getMinutes
in class Date
IllegalArgumentException
- when it's called.Calendar
,
Date.setMinutes(int)
public int getSeconds() throws IllegalArgumentException
getSeconds
in class Date
IllegalArgumentException
- when it's called.Calendar
,
Date.setSeconds(int)
public void setHours(int newValue) throws IllegalArgumentException
setHours
in class Date
newValue
- the hours.
IllegalArgumentException
- when it's called.Calendar
,
Date.getHours()
public void setMinutes(int newValue) throws IllegalArgumentException
setMinutes
in class Date
newValue
- the minutes.
IllegalArgumentException
- when it's called.Calendar
,
Date.getMinutes()
public void setSeconds(int newValue) throws IllegalArgumentException
setSeconds
in class Date
newValue
- the seconds.
IllegalArgumentException
- when it's called.Calendar
,
Date.getSeconds()
public static Date valueOf(String str)
str
- The string to parse.
java.sql.Date
value.public String toString()
toString
in class Date
Date.parse(String)
,
DateFormat
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |