public class Time extends java.util.Date
| Constructor and Description |
|---|
Time(int hour,
int minute,
int second)
Deprecated.
|
Time(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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDate()
Deprecated.
|
int |
getDay()
Deprecated.
|
int |
getMonth()
Deprecated.
|
int |
getYear()
Deprecated.
|
void |
setDate(int newValue)
Deprecated.
|
void |
setMonth(int newValue)
Deprecated.
|
void |
setYear(int newValue)
Deprecated.
|
java.lang.String |
toString()
This method returns this date in JDBC format.
|
static Time |
valueOf(java.lang.String str)
This method returns a new instance of this class by parsing a
date in JDBC format into a Java date.
|
public Time(int hour, int minute, int second)
hour - The hour for this Time (0-23)minute - The minute for this time (0-59)second - The second for this time (0-59)public Time(long date)
date - The time value to intialize this Time to.public int getDate() throws java.lang.IllegalArgumentException
getDate in class java.util.Datejava.lang.IllegalArgumentException - when it's called.Calendar,
Date.setDate(int)public int getDay() throws java.lang.IllegalArgumentException
getDay in class java.util.Datejava.lang.IllegalArgumentException - when it's called.Calendarpublic int getMonth() throws java.lang.IllegalArgumentException
getMonth in class java.util.Datejava.lang.IllegalArgumentException - when it's called.Date.setMonth(int),
Calendarpublic int getYear() throws java.lang.IllegalArgumentException
getYear in class java.util.Datejava.lang.IllegalArgumentException - when it's called.Calendar,
Date.setYear(int)public void setDate(int newValue) throws java.lang.IllegalArgumentException
setDate in class java.util.DatenewValue - the date.java.lang.IllegalArgumentException - when it's called.Calendar,
Date.getDate()public void setMonth(int newValue) throws java.lang.IllegalArgumentException
setMonth in class java.util.DatenewValue - the month, with a zero-based index
from January.java.lang.IllegalArgumentException - when it's called.Date.getMonth(),
Calendarpublic void setYear(int newValue) throws java.lang.IllegalArgumentException
setYear in class java.util.DatenewValue - the year minus 1900.java.lang.IllegalArgumentException - when it's called.Date.getYear(),
Calendarpublic static Time valueOf(java.lang.String str)
str - The string to parse.java.sql.Time value.public java.lang.String toString()
toString in class java.util.DateDate.parse(String),
DateFormat