Class JdbcDate

JdbcDate

A JDBC Date. For documentation of this class, see java.sql.Date .

Methods

MethodReturn typeBrief description
after(when)BooleanFor documentation of this method, see java.sql.Date#after(date).
before(when)BooleanFor documentation of this method, see java.sql.Date#before(date).
getDate()IntegerFor documentation of this method, see java.sql.Date#getDate().
getMonth()IntegerFor documentation of this method, see java.sql.Date#getMonth().
getTime()IntegerFor documentation of this method, see java.sql.Date#getTime().
getYear()IntegerFor documentation of this method, see java.sql.Date#getYear().
setDate(date)voidFor documentation of this method, see java.sql.Date#setDate(int).
setMonth(month)voidFor documentation of this method, see java.sql.Date#setMonth(int).
setTime(milliseconds)voidFor documentation of this method, see java.sql.Date#setTime(int).
setYear(year)voidFor documentation of this method, see java.sql.Date#setYear(int).

Detailed documentation

after(when)

For documentation of this method, see java.sql.Date#after(date).

Parameters

NameTypeDescription
whenJdbcDateA date to compare to.

Return

Booleantrue if and only if this date is strictly later than the provided date; false otherwise.


before(when)

For documentation of this method, see java.sql.Date#before(date).

Parameters

NameTypeDescription
whenJdbcDateA date to compare to.

Return

Booleantrue if and only if this date is strictly earlier than the provided date; false otherwise.


getDate()

For documentation of this method, see java.sql.Date#getDate().

Return

Integer — The day of the month represented by this date. The value is between 1 and 31.


getMonth()

For documentation of this method, see java.sql.Date#getMonth().

Return

Integer — The number representing the month that contains or begins with the instant in time represented by this date. The value returned is between 0 and 11, with the value 0 representing January.


getTime()

For documentation of this method, see java.sql.Date#getTime().

Return

Integer — The number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this date.


getYear()

For documentation of this method, see java.sql.Date#getYear().

Return

Integer — The result of subtracting 1900 from the year that contains or begins with the instant in time represented by this date, as interpreted in the local time zone.


setDate(date)

For documentation of this method, see java.sql.Date#setDate(int).

Parameters

NameTypeDescription
dateIntegerThe day of the month to set. The value is between 1 and 31, modified as needed. For example, if the date was April 30, for example, and the date is set to 31, then it is treated as if it were on May 1, because April has only 30 days.

setMonth(month)

For documentation of this method, see java.sql.Date#setMonth(int).

Parameters

NameTypeDescription
monthIntegerThe month value to set. The value returned is between 0 and 11, with the value 0 representing January.

setTime(milliseconds)

For documentation of this method, see java.sql.Date#setTime(int).

Parameters

NameTypeDescription
millisecondsIntegerThe number of milliseconds since January 1, 1970, 00:00:00 GMT, not to exceed the milliseconds representation for the year 8099. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.

setYear(year)

For documentation of this method, see java.sql.Date#setYear(int).

Parameters

NameTypeDescription
yearIntegerThe value to set the year with. This value plus 1900 is the resulting year the date has after this method executes.