| java.lang.Object | |
| ↳ | java.util.Date | 
|  Known Direct Subclasses | 
Date represents a specific moment in time, to the millisecond.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Initializes this 
            Dateinstance to the current time. | ||||||||||
|  |  
           This constructor was deprecated in API level 1. use  GregorianCalendar(int, int, int) | ||||||||||
|  |  
           This constructor was deprecated in API level 1. use  GregorianCalendar(int, int, int, int, int) | ||||||||||
|  |  
           This constructor was deprecated in API level 1. use  GregorianCalendar(int, int, int, int, int, int) | ||||||||||
|  | 
           Initializes this 
            Dateinstance using the specified millisecond value. | ||||||||||
|  |  
           This constructor was deprecated in API level 1. use  DateFormat | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  |  
           This method was deprecated in API level 1. use:   Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); cal.set(year + 1900, month, day, hour, minute, second); cal.getTime().getTime(); | ||||||||||
|  | 
           Returns if this 
            Dateis after the specified Date. | ||||||||||
|  | 
           Returns if this 
            Dateis before the specified Date. | ||||||||||
|  | 
           Returns a new 
            Datewith the same millisecond value as thisDate. | ||||||||||
|  | 
           Compare the receiver to the specified 
            Dateto determine the relative ordering. | ||||||||||
|  | 
           Compares the specified object to this 
            Dateand returns if they are equal. | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.DATE) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.DAY_OF_WEEK) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.HOUR_OF_DAY) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.MINUTE) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.MONTH) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.SECOND) | ||||||||||
|  | 
           Returns this 
            Dateas a millisecond value. | ||||||||||
|  |  
           This method was deprecated in API level 1. use  (Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / 60000 | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.get(Calendar.YEAR) - 1900 | ||||||||||
|  | 
           Returns an integer hash code for the receiver.
           | ||||||||||
|  |  
           This method was deprecated in API level 1. use  DateFormat | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.set(Calendar.DATE, day) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.set(Calendar.HOUR_OF_DAY, hour) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.set(Calendar.MINUTE, minute) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.set(Calendar.MONTH, month) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.set(Calendar.SECOND, second) | ||||||||||
|  | 
           Sets this 
            Dateto the specified millisecond value. | ||||||||||
|  |  
           This method was deprecated in API level 1. use  Calendar.set(Calendar.YEAR, year + 1900) | ||||||||||
|  |  
           This method was deprecated in API level 1. use  DateFormat | ||||||||||
|  |  
           This method was deprecated in API level 1. use  DateFormat | ||||||||||
|  | 
           Returns a string representation of this 
            Date. | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.lang.Object | |||||||||||
|  From interface java.lang.Comparable | |||||||||||
 This constructor was deprecated in API level 1.
 use GregorianCalendar(int, int, int) 
Constructs a new Date initialized to midnight in the default TimeZone on the specified date.
| year | the year, 0 is 1900. | 
|---|---|
| month | the month, 0 - 11. | 
| day | the day of the month, 1 - 31. | 
 This constructor was deprecated in API level 1.
 use GregorianCalendar(int, int, int, int, int) 
Constructs a new Date initialized to the specified date and time in the default TimeZone.
| year | the year, 0 is 1900. | 
|---|---|
| month | the month, 0 - 11. | 
| day | the day of the month, 1 - 31. | 
| hour | the hour of day, 0 - 23. | 
| minute | the minute of the hour, 0 - 59. | 
 This constructor was deprecated in API level 1.
 use GregorianCalendar(int, int, int, int, int, int) 
Constructs a new Date initialized to the specified date and time in the default TimeZone.
| year | the year, 0 is 1900. | 
|---|---|
| month | the month, 0 - 11. | 
| day | the day of the month, 1 - 31. | 
| hour | the hour of day, 0 - 23. | 
| minute | the minute of the hour, 0 - 59. | 
| second | the second of the minute, 0 - 59. | 
Initializes this Date instance using the specified millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
| milliseconds | the number of milliseconds since Jan. 1, 1970 GMT. | 
|---|
 This constructor was deprecated in API level 1.
 use DateFormat 
Constructs a new Date initialized to the date and time parsed from the specified String.
| string | the String to parse. | 
|---|
 This method was deprecated in API level 1.
 use:  Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); cal.set(year + 1900, month, day, hour, minute, second); cal.getTime().getTime(); 
Returns the millisecond value of the specified date and time in GMT.
| year | the year, 0 is 1900. | 
|---|---|
| month | the month, 0 - 11. | 
| day | the day of the month, 1 - 31. | 
| hour | the hour of day, 0 - 23. | 
| minute | the minute of the hour, 0 - 59. | 
| second | the second of the minute, 0 - 59. | 
Returns if this Date is after the specified Date.
| date | a Date instance to compare. | 
|---|
true if this Date is after the specified Date, false otherwise. Returns if this Date is before the specified Date.
| date | a Dateinstance to compare. | 
|---|
true if this Date is before the specified Date, false otherwise. Returns a new Date with the same millisecond value as this Date.
Date.Compare the receiver to the specified Date to determine the relative ordering.
| date | a Dateto compare against. | 
|---|
int < 0 if this Date is less than the specified Date, 0 if they are equal, and an int > 0 if this Date is greater. Compares the specified object to this Date and returns if they are equal. To be equal, the object must be an instance of Date and have the same millisecond value.
| object | the object to compare with this object. | 
|---|
true if the specified object is equal to this Date, false otherwise.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.DATE) 
Returns the gregorian calendar day of the month for this Date object.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.DAY_OF_WEEK) 
Returns the gregorian calendar day of the week for this Date object.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.HOUR_OF_DAY) 
Returns the gregorian calendar hour of the day for this Date object.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.MINUTE) 
Returns the gregorian calendar minute of the hour for this Date object.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.MONTH) 
Returns the gregorian calendar month for this Date object.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.SECOND) 
Returns the gregorian calendar second of the minute for this Date object.
Returns this Date as a millisecond value. The value is the number of milliseconds since Jan. 1, 1970, midnight GMT.
 This method was deprecated in API level 1.
 use (Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / 60000 
Returns the timezone offset in minutes of the default TimeZone.
TimeZone.
 This method was deprecated in API level 1.
 use Calendar.get(Calendar.YEAR) - 1900 
Returns the gregorian calendar year since 1900 for this Date object.
Returns an integer hash code for the receiver. Objects which are equal return the same value for this method.
Date's hash.
 This method was deprecated in API level 1.
 use DateFormat 
Returns the millisecond value of the date and time parsed from the specified String. Many date/time formats are recognized, including IETF standard syntax, i.e. Tue, 22 Jun 1999 12:16:00 GMT-0500
| string | the String to parse. | 
|---|
 This method was deprecated in API level 1.
 use Calendar.set(Calendar.DATE, day) 
Sets the gregorian calendar day of the month for this Date object.
| day | the day of the month. | 
|---|
 This method was deprecated in API level 1.
 use Calendar.set(Calendar.HOUR_OF_DAY, hour) 
Sets the gregorian calendar hour of the day for this Date object.
| hour | the hour of the day. | 
|---|
 This method was deprecated in API level 1.
 use Calendar.set(Calendar.MINUTE, minute) 
Sets the gregorian calendar minute of the hour for this Date object.
| minute | the minutes. | 
|---|
 This method was deprecated in API level 1.
 use Calendar.set(Calendar.MONTH, month) 
Sets the gregorian calendar month for this Date object.
| month | the month. | 
|---|
 This method was deprecated in API level 1.
 use Calendar.set(Calendar.SECOND, second) 
Sets the gregorian calendar second of the minute for this Date object.
| second | the seconds. | 
|---|
Sets this Date to the specified millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
| milliseconds | the number of milliseconds since Jan. 1, 1970 GMT. | 
|---|
 This method was deprecated in API level 1.
 use Calendar.set(Calendar.YEAR, year + 1900) 
Sets the gregorian calendar year since 1900 for this Date object.
| year | the year since 1900. | 
|---|
 This method was deprecated in API level 1.
 use DateFormat 
Returns the string representation of this Date in GMT in the format "22 Jun 1999 13:02:00 GMT".
 This method was deprecated in API level 1.
 use DateFormat 
Returns the string representation of this Date for the default Locale.
Returns a string representation of this Date. 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.