Class: SqlDate

eclairjs/sql.SqlDate

A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value. A milliseconds value represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated.

Constructor

new SqlDate(number)

Parameters:
Name Type Description
number number | string | Date of millisecond, string date representation, or Date object
Source:

Methods

after(when) → {boolean}

Tests if this date is after the specified date.
Parameters:
Name Type Description
when module:eclairjs/sql.SqlDate
Source:
Returns:
Type
boolean

before(when) → {boolean}

Tests if this date is before the specified date.
Parameters:
Name Type Description
when module:eclairjs/sql.SqlDate
Source:
Returns:
Type
boolean

clone() → {module:eclairjs/sql.SqlDate}

Return a copy of this object.
Source:
Returns:
Type
module:eclairjs/sql.SqlDate

compareTo(anotherDate) → {integer}

Compares two Dates for ordering
Parameters:
Name Type Description
anotherDate module:eclairjs/sql.SqlDate
Source:
Returns:
Type
integer

equals(when) → {boolean}

Compares two dates for equality.
Parameters:
Name Type Description
when module:eclairjs/sql.SqlDate
Source:
Returns:
Type
boolean

setTime(milliseconds)

Sets an existing Date object using the given milliseconds time value.
Parameters:
Name Type Description
milliseconds
Source:

toJSON() → {string}

Formats a date in the date escape format yyyy-mm-dd.
Source:
Returns:
Type
string

toString() → {string}

Formats a date in the date escape format yyyy-mm-dd.
Source:
Returns:
Type
string