Constructor

SpannerDate

new SpannerDate(date, month, date)

Parameter

date

Optional

(string or number)

String representing the date or number representing the year.

month

Optional

number

Number representing the month.

date

Optional

number

Number representing the date.

Extends
Date
See also
Spanner.date
https://cloud.google.com/spanner/docs/data-types#date-type

Example

Spanner.date('3-3-1933');

Method

toJSON

toJSON() returns string

Returns the date in ISO date format. YYYY-[M]M-[D]D

Returns

string