public class Time extends 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.
|
String |
toString()
This method returns this date in JDBC format.
|
static Time |
valueOf(String str)
This method returns a new instance of this class by parsing a
date in JDBC format into a Java date.
|
after, before, clone, compareTo, equals, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, setTime, toGMTString, toLocaleString, UTCpublic 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 IllegalArgumentException
getDate in class DateIllegalArgumentException - when it's called.Calendar,
Date.setDate(int)public int getDay() throws IllegalArgumentException
getDay in class DateIllegalArgumentException - when it's called.Calendarpublic int getMonth() throws IllegalArgumentException
getMonth in class DateIllegalArgumentException - when it's called.Date.setMonth(int),
Calendarpublic int getYear() throws IllegalArgumentException
getYear in class DateIllegalArgumentException - when it's called.Calendar,
Date.setYear(int)public void setDate(int newValue) throws IllegalArgumentException
setDate in class DatenewValue - the date.IllegalArgumentException - when it's called.Calendar,
Date.getDate()public void setMonth(int newValue) throws IllegalArgumentException
setMonth in class DatenewValue - the month, with a zero-based index
from January.IllegalArgumentException - when it's called.Date.getMonth(),
Calendarpublic void setYear(int newValue) throws IllegalArgumentException
setYear in class DatenewValue - the year minus 1900.IllegalArgumentException - when it's called.Date.getYear(),
Calendarpublic static Time valueOf(String str)
str - The string to parse.java.sql.Time value.public String toString()
toString in class DateDate.parse(String),
DateFormat