Google Cloud Spanner C++ Client
A C++ Client Library for Google Cloud Spanner
Public Member Functions | List of all members
google::cloud::spanner::v1::Date Class Reference

Represents a date in the proleptic Gregorian calendar as a triple of year, month (1-12), and day (1-31). More...

#include <google/cloud/spanner/date.h>

Public Member Functions

 Date (std::int64_t year, int month, int day)
 
 Date ()
 
std::int64_t year () const
 
int month () const
 
int day () const
 

Detailed Description

Represents a date in the proleptic Gregorian calendar as a triple of year, month (1-12), and day (1-31).

Standard C++11 lacks a good "date" abstraction, so we supply a simple implementation of a YMD triple.

Definition at line 35 of file date.h.

Constructor & Destructor Documentation

◆ Date() [1/2]

google::cloud::spanner::v1::Date::Date ( std::int64_t  year,
int  month,
int  day 
)

Definition at line 39 of file date.cc.

◆ Date() [2/2]

google::cloud::spanner::v1::Date::Date ( )
inline

Definition at line 38 of file date.h.

Member Function Documentation

◆ day()

int google::cloud::spanner::v1::Date::day ( ) const
inline

Definition at line 42 of file date.h.

◆ month()

int google::cloud::spanner::v1::Date::month ( ) const
inline

Definition at line 41 of file date.h.

◆ year()

std::int64_t google::cloud::spanner::v1::Date::year ( ) const
inline

Definition at line 40 of file date.h.