Date Members

Class Overview | This Package | All Packages

Constructors

Name Description
Date() Allocates a Date object and initializes it so that it represents the time at which it was allocated measured to the nearest millisecond.
Date(int, int, int) Allocates a Date object and initializes it so that it represents midnight, local time, at the beginning of the day specified by the year, month, and date arguments. Deprecated.
Date(int, int, int, int, int) Allocates a Date object and initializes it so that it represents the specified hour and minute, local time, of the date specified by the year, month, date, hrs, and min arguments. Deprecated.
Date(int, int, int, int, int, int) Allocates a Date object and initializes it so that it represents the specified hour, minute, and second, local time of the date specified by the year, month, date, hrs, min, and sec arguments. Deprecated.
Date(long) Allocates a Date object and initializes it to represent the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.
Date(String) Allocates a Date object and initializes it so that it represents the date and time indicated by the string s, which is interpreted as if by the parse method. Deprecated.

Methods

Name Description
after(Date) Tests if this date is after the specified date.
before(Date) Tests if this date is before the specified date.
equals(Object) Compares two dates.
getDate() Returns the day of the month represented by this date. Deprecated.
getDay() Returns the day of the week represented by this date. Deprecated.
getHours() Returns the hour represented by this date. Deprecated.
getMinutes() Returns the number of minutes past the hour represented by this date. Deprecated.
getMonth() Returns the month represented by this date. Deprecated.
getSeconds() Returns the number of seconds past the minute represented by this date. Deprecated.
getTime() Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this date.
getTimezoneOffset() Returns the local time-zone offset. Deprecated.
getYear() Returns the year represented by this date, minus 1900. Deprecated.
hashCode() Returns a hash code value for this object.
parse(String) Given a string representing a time, parse it and return the time value. Deprecated.
setDate(int) Sets the day of the month of this date to the specified value. Deprecated.
setHours(int) Sets the hour of this date to the specified value. Deprecated.
setMinutes(int) Sets the minutes of this date to the specified value. Deprecated.
setMonth(int) Sets the month of this date to the specified value. Deprecated.
setSeconds(int) Sets the seconds of this date to the specified value. Deprecated.
setTime(long) Sets this date to represent the specified number of milliseconds since January 1, 1970 00:00:00 GMT.
setYear(int) Sets the year of this date to be the specified value plus 1900. Deprecated.
toGMTString() Creates a string representation of this date. Deprecated.
toLocaleString() Creates a string representation of this date in an implementation-dependent form. Deprecated.
toString() Creates a canonical string representation of the date.
UTC(int, int, int, int, int, int) Determines the date and time based on the arguments. Deprecated.