DthingApi
Public Member Functions | List of all members
java.util.Date Class Reference

Public Member Functions

 Date ()
 
 Date (long milliseconds)
 
boolean after (Date date)
 
boolean before (Date date)
 
Object clone ()
 
int compareTo (Date date)
 
boolean equals (Object object)
 
long getTime ()
 
int hashCode ()
 
void setTime (long milliseconds)
 
String toString ()
 

Detailed Description

represents a specific moment in time, to the millisecond.

See also
System::currentTimeMillis
Calendar
GregorianCalendar
SimpleTimeZone
TimeZone

Constructor & Destructor Documentation

◆ Date() [1/2]

java.util.Date.Date ( )
inline

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
millisecondsthe number of milliseconds since Jan. 1, 1970 GMT.

Member Function Documentation

◆ after()

boolean java.util.Date.after ( Date  date)
inline

Returns if this

is after the specified Date.

Parameters
datea Date instance to compare.
Returns
true
if this is after the specified ,
false
otherwise.

◆ before()

boolean java.util.Date.before ( Date  date)
inline

Returns if this

is before the specified Date.

Parameters
datea instance to compare.
Returns
true
if this is before the specified ,
false
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
datea to compare against.
Returns
an
int < 0
if this is less than the specified ,
0
if they are equal, and an
int > 0
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
objectthe object to compare with this object.
Returns
true
if the specified object is equal to this ,
false
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
millisecondsthe 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

SimpleDateFormat

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

SimpleDateFormat

instead.


The documentation for this class was generated from the following file: