Date-like object used to represent Cloud Spanner Dates. DATE types represent a logical calendar date, independent of time zone. DATE values do not represent a specific 24-hour period. Rather, a given DATE value represents a different 24-hour period when interpreted in a different time zone. Because of this, all values passed to will be interpreted as local time.
To represent an absolute point in time, use Spanner.timestamp() .
Inheritance
Date > SpannerDatePackage
@google-cloud/spannerExample
Spanner
.
date
(
'3-3-1933'
);
Constructors
(constructor)(dateString)
constructor
(
dateString
?:
string
);
Constructs a new instance of the SpannerDate
class
dateString
string
(constructor)(year, month, date)
constructor
(
year
:
number
,
month
:
number
,
date
:
number
);
Constructs a new instance of the SpannerDate
class
year
number
month
number
date
number
Methods
toJSON()
toJSON
()
:
string
;
Returns the date in ISO date format. YYYY-MM-DD
string
{string}