All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>

  • Constructor Summary

    Constructors

    Date(int year, int month, int day)

    Date(long date)

    Constructs a Date object using the given milliseconds time value.

  • Method Summary

    int

    getHours()

    int

    int

    void

    setHours(int i)

    void

    setMinutes(int i)

    void

    setSeconds(int i)

    void

    setTime(long date)

    Sets an existing Date object using the given milliseconds time value.

    toInstant()

    This method always throws an UnsupportedOperationException and should not be used because SQL Date values do not have a time component.

    Creates a LocalDate instance using the year, month and day from this Date object.

    toString()

    Formats a date in the date escape format yyyy-mm-dd.

    Converts a string in JDBC date escape format to a Date value.

    Obtains an instance of Date from a LocalDate object with the same year, month and day of month value as the given LocalDate.

    Methods declared in class Date

    after, before, clone, compareTo, equals, from, getDate, getDay, getMonth, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setMonth, setYear, toGMTString, toLocaleString, UTC

    boolean

    Tests if this date is after the specified date.

    boolean

    Tests if this date is before the specified date.

    Return a copy of this object.

    int

    Compares two Dates for ordering.

    boolean

    Compares two dates for equality.

    Obtains an instance of Date from an Instant object.

    int

    int

    int

    long

    Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.

    int

    int

    int

    Returns a hash code value for this object.

    static long

    void

    void

    void

    static long

    UTC(int year, int month, int date, int hrs, int min, int sec)

    Methods declared in class Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Constructor Details

    • Date

    • Date

  • Method Details

    • setTime

    • valueOf

    • toString

    • getHours

    • getMinutes

    • getSeconds

    • setHours

    • setMinutes

    • setSeconds

    • valueOf

    • toLocalDate

    • toInstant