Lines Matching defs:Date

31  * {@code Date} represents a specific moment in time, to the millisecond.
39 public class Date implements Serializable, Cloneable, Comparable<Date> {
44 private static int creationYear = new Date().getYear();
56 * Initializes this {@code Date} instance to the current time.
58 public Date() {
63 * Constructs a new {@code Date} initialized to midnight in the default {@code TimeZone} on
77 public Date(int year, int month, int day) {
84 * Constructs a new {@code Date} initialized to the specified date and time in the
102 public Date(int year, int month, int day, int hour, int minute) {
109 * Constructs a new {@code Date} initialized to the specified date and time in the
129 public Date(int year, int month, int day, int hour, int minute, int second) {
136 * Initializes this {@code Date} instance using the specified millisecond value. The
142 public Date(long milliseconds) {
147 * Constructs a new {@code Date} initialized to the date and time parsed from the
156 public Date(String string) {
161 * Returns if this {@code Date} is after the specified Date.
164 * a Date instance to compare.
165 * @return {@code true} if this {@code Date} is after the specified {@code Date},
168 public boolean after(Date date) {
173 * Returns if this {@code Date} is before the specified Date.
176 * a {@code Date} instance to compare.
177 * @return {@code true} if this {@code Date} is before the specified {@code Date},
180 public boolean before(Date date) {
185 * Returns a new {@code Date} with the same millisecond value as this {@code Date}.
187 * @return a shallow copy of this {@code Date}.
201 * Compare the receiver to the specified {@code Date} to determine the relative
205 * a {@code Date} to compare against.
206 * @return an {@code int < 0} if this {@code Date} is less than the specified {@code Date}, {@code 0} if
207 * they are equal, and an {@code int > 0} if this {@code Date} is greater.
209 public int compareTo(Date date) {
220 * Compares the specified object to this {@code Date} and returns if they are equal.
221 * To be equal, the object must be an instance of {@code Date} and have the same millisecond
226 * @return {@code true} if the specified object is equal to this {@code Date}, {@code false}
233 return (object == this) || (object instanceof Date)
234 && (milliseconds == ((Date) object).milliseconds);
238 * Returns the gregorian calendar day of the month for this {@code Date} object.
250 * Returns the gregorian calendar day of the week for this {@code Date} object.
262 * Returns the gregorian calendar hour of the day for this {@code Date} object.
274 * Returns the gregorian calendar minute of the hour for this {@code Date} object.
286 * Returns the gregorian calendar month for this {@code Date} object.
298 * Returns the gregorian calendar second of the minute for this {@code Date} object.
310 * Returns this {@code Date} as a millisecond value. The value is the number of
334 * Returns the gregorian calendar year since 1900 for this {@code Date} object.
349 * @return this {@code Date}'s hash.
561 return new Date(year - 1900, month, date, hour, minute, second)
568 * Sets the gregorian calendar day of the month for this {@code Date} object.
583 * Sets the gregorian calendar hour of the day for this {@code Date} object.
598 * Sets the gregorian calendar minute of the hour for this {@code Date} object.
613 * Sets the gregorian calendar month for this {@code Date} object.
628 * Sets the gregorian calendar second of the minute for this {@code Date} object.
643 * Sets this {@code Date} to the specified millisecond value. The value is the
654 * Sets the gregorian calendar year since 1900 for this {@code Date} object.
669 * Returns the string representation of this {@code Date} in GMT in the format: 22
672 * @return the string representation of this {@code Date} in GMT.
692 * Returns the string representation of this {@code Date} for the default {@code Locale}.
694 * @return the string representation of this {@code Date} for the default {@code Locale}.
704 * Returns a string representation of this {@code Date}.
711 * @return the string representation of this {@code Date}.