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