represents a specific moment in time, to the millisecond.
- See also
- System::currentTimeMillis
-
Calendar
-
GregorianCalendar
-
SimpleTimeZone
-
TimeZone
◆ Date() [1/2]
Initializes this
instance to the current time.
◆ Date() [2/2]
java.util.Date.Date |
( |
long |
milliseconds | ) |
|
|
inline |
Initializes this
instance using the specified millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
- Parameters
-
milliseconds | the number of milliseconds since Jan. 1, 1970 GMT. |
◆ after()
boolean java.util.Date.after |
( |
Date |
date | ) |
|
|
inline |
Returns if this
is after the specified Date.
- Parameters
-
date | a Date instance to compare. |
- Returns
- if this is after the specified , otherwise.
◆ before()
boolean java.util.Date.before |
( |
Date |
date | ) |
|
|
inline |
Returns if this
is before the specified Date.
- Parameters
-
date | a instance to compare. |
- Returns
- if this is before the specified , otherwise.
◆ clone()
Object java.util.Date.clone |
( |
| ) |
|
|
inline |
Returns a new
with the same millisecond value as this
.
- Returns
- a shallow copy of this .
- See also
- java.lang.Cloneable
◆ compareTo()
int java.util.Date.compareTo |
( |
Date |
date | ) |
|
|
inline |
Compare the receiver to the specified
to determine the relative ordering.
- Parameters
-
date | a to compare against. |
- Returns
- an if this is less than the specified , if they are equal, and an if this is greater.
◆ equals()
boolean java.util.Date.equals |
( |
Object |
object | ) |
|
|
inline |
Compares the specified object to this
and returns if they are equal. To be equal, the object must be an instance of
and have the same millisecond value.
- Parameters
-
object | the object to compare with this object. |
- Returns
- if the specified object is equal to this , otherwise.
- See also
- hashCode
◆ getTime()
long java.util.Date.getTime |
( |
| ) |
|
|
inline |
Returns this
as a millisecond value. The value is the number of milliseconds since Jan. 1, 1970, midnight GMT.
- Returns
- the number of milliseconds since Jan. 1, 1970, midnight GMT.
◆ hashCode()
int java.util.Date.hashCode |
( |
| ) |
|
|
inline |
Returns an integer hash code for the receiver. Objects which are equal return the same value for this method.
- Returns
- this 's hash.
- See also
- equals
◆ setTime()
void java.util.Date.setTime |
( |
long |
milliseconds | ) |
|
|
inline |
Sets this
to the specified millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
- Parameters
-
milliseconds | the number of milliseconds since Jan. 1, 1970 GMT. |
◆ toString()
String java.util.Date.toString |
( |
| ) |
|
|
inline |
Returns a string representation of this
. The formatting is equivalent to using a
with the format string "EEE MMM dd HH:mm:ss zzz yyyy", which looks something like "Tue Jun 22 13:07:00 PDT 1999". The current default time zone and locale are used. If you need control over the time zone or locale, use
instead.
The documentation for this class was generated from the following file: