odbc::Date Class Reference

Inheritance diagram for odbc::Date:

odbc::Timestamp odbc::Timestamp List of all members.

Detailed Description

An SQL DATE.

Definition at line 307 of file types.h.

Public Member Functions

 Date (const Date &d)
 Copy constructor.
 Date (const ODBCXX_STRING &str)
 Constructor.
 Date (std::time_t t)
 Constructor.
 Date ()
 Constructor.
 Date (int year, int month, int day)
 Constructor.
 Date (const Date &d)
 Copy constructor.
 Date (const ODBCXX_STRING &str)
 Constructor.
 Date (std::time_t t)
 Constructor.
 Date ()
 Constructor.
 Date (int year, int month, int day)
 Constructor.
int getDay () const
 Gets the monthday of this date.
int getDay () const
 Gets the monthday of this date.
int getMonth () const
 Gets the month of this date.
int getMonth () const
 Gets the month of this date.
std::time_t getTime () const
 Returns the time_t value of 00:00:00 at this date.
std::time_t getTime () const
 Returns the time_t value of 00:00:00 at this date.
int getYear () const
 Gets the year of this date.
int getYear () const
 Gets the year of this date.
Dateoperator= (const Date &d)
 Assignment operator.
Dateoperator= (const Date &d)
 Assignment operator.
void parse (const ODBCXX_STRING &str)
 Sets this date from a string in the YYYY-MM-DD format.
void parse (const ODBCXX_STRING &str)
 Sets this date from a string in the YYYY-MM-DD format.
void setDay (int day)
 Sets the day of this date.
void setDay (int day)
 Sets the day of this date.
void setMonth (int month)
 Sets the month of this date.
void setMonth (int month)
 Sets the month of this date.
virtual void setTime (std::time_t t)
 Sets this date to the specified time_t value.
virtual void setTime (std::time_t t)
 Sets this date to the specified time_t value.
void setYear (int year)
 Sets the year of this date.
void setYear (int year)
 Sets the year of this date.
virtual ODBCXX_STRING toString () const
 Gets the date as a string in the YYYY-MM-DD format.
virtual ODBCXX_STRING toString () const
 Gets the date as a string in the YYYY-MM-DD format.
virtual ~Date ()
 Destructor.
virtual ~Date ()
 Destructor.

Protected Member Functions

int _validateDay (int d)
int _validateDay (int d)
int _validateMonth (int m)
int _validateMonth (int m)
int _validateYear (int y)
int _validateYear (int y)

Protected Attributes

int day_
int month_
int year_


Constructor & Destructor Documentation

odbc::Date::Date (  )  [explicit]

Constructor.

Sets this date to today.

odbc::Date::Date ( std::time_t  t  )  [inline]

Constructor.

Sets this date to the specified time_t value.

Definition at line 352 of file types.h.

odbc::Date::Date ( const ODBCXX_STRING &  str  )  [inline]

Constructor.

Sets this date to the specified string in the YYYY-MM-DD format.

Definition at line 360 of file types.h.

odbc::Date::Date (  )  [explicit]

Constructor.

Sets this date to today.

odbc::Date::Date ( std::time_t  t  )  [inline]

Constructor.

Sets this date to the specified time_t value.

Definition at line 352 of file types.h.

odbc::Date::Date ( const ODBCXX_STRING &  str  )  [inline]

Constructor.

Sets this date to the specified string in the YYYY-MM-DD format.

Definition at line 360 of file types.h.


The documentation for this class was generated from the following files:
GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy