| java.lang.Object java.util.Date
Constructor Summary | |
public | Date() Initializes this Date instance to the current date and time. | public | Date(int year, int month, int day) Constructs a new Date initialized to midnight in the default TimeZone on
the specified date. | public | Date(int year, int month, int day, int hour, int minute) Constructs a new Date initialized to the specified date and time in the
default TimeZone. | public | Date(int year, int month, int day, int hour, int minute, int second) Constructs a new Date initialized to the specified date and time in the
default TimeZone. | public | Date(long milliseconds) Initializes this Date instance using the specified millisecond value. | public | Date(String string) Constructs a new Date initialized to the date and time parsed from the
specified String. |
Method Summary | |
public static long | UTC(int year, int month, int day, int hour, int minute, int second) Answers the millisecond value of the specified date and time in GMT. | public boolean | after(Date date) Answers if this Date is after the specified Date. | public boolean | before(Date date) Boolean indication of whether or not this Date occurs
earlier than the Date argument. | public Object | clone() Answers a new Date with the same millisecond value as this Date. | public int | compareTo(Date date) Compare the receiver to the specified Date to determine the relative
ordering. | public boolean | equals(Object object) Compares the specified object to this Date and answer if they are equal. | public int | getDate() Answers the gregorian calendar day of the month for this Date object. | public int | getDay() Answers the gregorian calendar day of the week for this Date object. | public int | getHours() Answers the gregorian calendar hour of the day for this Date object. | public int | getMinutes() Answers the gregorian calendar minute of the hour for this Date object. | public int | getMonth() Answers the gregorian calendar month for this Date object. | public int | getSeconds() Answers the gregorian calendar second of the minute for this Date object. | public long | getTime() Answers this Date as a millisecond value. | public int | getTimezoneOffset() Answers the timezone offset in minutes of the default TimeZone. | public int | getYear() Answers the gregorian calendar year since 1900 for this Date object. | public int | hashCode() Answers an integer hash code for the receiver. | public static long | parse(String string) Answers the millisecond value of the date and time parsed from the
specified String. | public void | setDate(int day) Sets the gregorian calendar day of the month for this Date object. | public void | setHours(int hour) Sets the gregorian calendar hour of the day for this Date object. | public void | setMinutes(int minute) Sets the gregorian calendar minute of the hour for this Date object. | public void | setMonth(int month) Sets the gregorian calendar month for this Date object. | public void | setSeconds(int second) Sets the gregorian calendar second of the minute for this Date object. | public void | setTime(long milliseconds) Sets this Date to the specified millisecond value. | public void | setYear(int year) Sets the gregorian calendar year since 1900 for this Date object. | public String | toGMTString() | public String | toLocaleString() Answers the string representation of this Date for the current Locale. | public String | toString() |
Date | public Date()(Code) | | Initializes this Date instance to the current date and time.
|
Date | public Date(int year, int month, int day)(Code) | | Constructs a new Date initialized to midnight in the default TimeZone on
the specified date.
Parameters: year - the year, 0 is 1900 Parameters: month - the month, 0 - 11 Parameters: day - the day of the month, 1 - 31 |
Date | public Date(int year, int month, int day, int hour, int minute)(Code) | | Constructs a new Date initialized to the specified date and time in the
default TimeZone.
Parameters: year - the year, 0 is 1900 Parameters: month - the month, 0 - 11 Parameters: day - the day of the month, 1 - 31 Parameters: hour - the hour of day, 0 - 23 Parameters: minute - the minute of the hour, 0 - 59 |
Date | public Date(int year, int month, int day, int hour, int minute, int second)(Code) | | Constructs a new Date initialized to the specified date and time in the
default TimeZone.
Parameters: year - the year, 0 is 1900 Parameters: month - the month, 0 - 11 Parameters: day - the day of the month, 1 - 31 Parameters: hour - the hour of day, 0 - 23 Parameters: minute - the minute of the hour, 0 - 59 Parameters: second - the second of the minute, 0 - 59 |
Date | public Date(long milliseconds)(Code) | | Initializes this Date 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 |
Date | public Date(String string)(Code) | | Constructs a new Date initialized to the date and time parsed from the
specified String.
Parameters: string - the String to parse |
UTC | public static long UTC(int year, int month, int day, int hour, int minute, int second)(Code) | | Answers the millisecond value of the specified date and time in GMT.
Parameters: year - the year, 0 is 1900 Parameters: month - the month, 0 - 11 Parameters: day - the day of the month, 1 - 31 Parameters: hour - the hour of day, 0 - 23 Parameters: minute - the minute of the hour, 0 - 59 Parameters: second - the second of the minute, 0 - 59 long |
after | public boolean after(Date date)(Code) | | Answers if this Date is after the specified Date.
Parameters: date - a Date instance to compare true if this Date is after the specified Date, false otherwise |
before | public boolean before(Date date)(Code) | | Boolean indication of whether or not this Date occurs
earlier than the Date argument.
Parameters: date - a Date instance to compare true if this Date occurs earlierthan date , otherwise false |
compareTo | public int compareTo(Date date)(Code) | | Compare the receiver to the specified Date to determine the relative
ordering.
Parameters: date - a Date an int < 0 if this Date is less than the specified Date, 0 ifthey are equal, and > 0 if this Date is greater |
equals | public boolean equals(Object object)(Code) | | Compares the specified object to this Date and answer if they are equal.
The object must be an instance of Date and have the same millisecond
value.
Parameters: object - the object to compare with this object true if the specified object is equal to this Date, falseotherwise See Also: Date.hashCode |
getDate | public int getDate()(Code) | | Answers the gregorian calendar day of the month for this Date object.
the day of the month |
getDay | public int getDay()(Code) | | Answers the gregorian calendar day of the week for this Date object.
the day of the week |
getHours | public int getHours()(Code) | | Answers the gregorian calendar hour of the day for this Date object.
the hour of the day |
getMinutes | public int getMinutes()(Code) | | Answers the gregorian calendar minute of the hour for this Date object.
the minutes |
getMonth | public int getMonth()(Code) | | Answers the gregorian calendar month for this Date object.
the month |
getSeconds | public int getSeconds()(Code) | | Answers the gregorian calendar second of the minute for this Date object.
the seconds |
getTime | public long getTime()(Code) | | Answers this Date as a millisecond value. The value is the number of
milliseconds since Jan. 1, 1970 GMT.
the number of milliseconds since Jan. 1, 1970 GMT. |
getTimezoneOffset | public int getTimezoneOffset()(Code) | | Answers the timezone offset in minutes of the default TimeZone.
the timezone offset in minutes of the default TimeZone |
getYear | public int getYear()(Code) | | Answers the gregorian calendar year since 1900 for this Date object.
the year - 1900 |
hashCode | public int hashCode()(Code) | | Answers an integer hash code for the receiver. Objects which are equal
answer the same value for this method.
the receiver's hash See Also: Date.equals |
parse | public static long parse(String string)(Code) | | Answers 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
Parameters: string - the String to parse the millisecond value parsed from the String |
setDate | public void setDate(int day)(Code) | | Sets the gregorian calendar day of the month for this Date object.
Parameters: day - the day of the month |
setHours | public void setHours(int hour)(Code) | | Sets the gregorian calendar hour of the day for this Date object.
Parameters: hour - the hour of the day |
setMinutes | public void setMinutes(int minute)(Code) | | Sets the gregorian calendar minute of the hour for this Date object.
Parameters: minute - the minutes |
setMonth | public void setMonth(int month)(Code) | | Sets the gregorian calendar month for this Date object.
Parameters: month - the month |
setSeconds | public void setSeconds(int second)(Code) | | Sets the gregorian calendar second of the minute for this Date object.
Parameters: second - the seconds |
setTime | public void setTime(long milliseconds)(Code) | | Sets this Date 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. |
setYear | public void setYear(int year)(Code) | | Sets the gregorian calendar year since 1900 for this Date object.
Parameters: year - the year since 1900 |
toGMTString | public String toGMTString()(Code) | | Answers the string representation of this Date in GMT in the format: 22
Jun 1999 13:02:00 GMT
the string representation of this Date in GMT |
toLocaleString | public String toLocaleString()(Code) | | Answers the string representation of this Date for the current Locale.
the string representation of this Date for the current Locale |
toString | public String toString()(Code) | | Answers the string representation of this Date in the format: Tue Jun 22
13:07:00 GMT 1999
the string representation of this Date |
|
|