public class Time extends Date implements Cloneable, Comparable, Serializable
Constructor and Description |
---|
Time(int hour,
int minute,
int second) |
Time(long time) |
Modifier and Type | Method and Description |
---|---|
int |
getDate()
Returns the gregorian calendar day of the month for this
Date object. |
int |
getDay()
Returns the gregorian calendar day of the week for this
Date object. |
int |
getMonth()
Returns the gregorian calendar month for this
Date object. |
int |
getYear()
Returns the gregorian calendar year since 1900 for this
Date object. |
void |
setDate(int i)
Sets the gregorian calendar day of the month for this
Date object. |
void |
setMonth(int i)
Sets the gregorian calendar month for this
Date object. |
void |
setTime(long time)
Sets this
Date to the specified millisecond value. |
void |
setYear(int i)
Sets the gregorian calendar year since 1900 for this
Date object. |
String |
toString()
Returns the string representation of this
Date in the format: Tue Jun 22
13:07:00 GMT 1999 |
static Time |
valueOf(String s) |
after, before, clone, compareTo, compareTo, equals, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, toGMTString, toLocaleString, UTC
finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo
public int getDate()
Date
Date
object.public int getDay()
Date
Date
object.public int getMonth()
Date
Date
object.public int getYear()
Date
Date
object.public void setDate(int i)
Date
Date
object.public void setMonth(int i)
Date
Date
object.public void setTime(long time)
Date
Date
to the specified millisecond value. The value is the
number of milliseconds since Jan. 1, 1970 GMT.public void setYear(int i)
Date
Date
object.public String toString()
Date
Date
in the format: Tue Jun 22
13:07:00 GMT 1999