libodbc++
0.2.5
|
An SQL DATE. More...
#include <types.h>
Public Member Functions | |
Date (int year, int month, int day) | |
Constructor. | |
Date () | |
Constructor. | |
Date (std::time_t t) | |
Constructor. | |
Date (const std::string &str) | |
Constructor. | |
Date (const Date &d) | |
Copy constructor. | |
Date & | operator= (const Date &d) |
Assignment operator. | |
virtual | ~Date () |
Destructor. | |
virtual void | setTime (std::time_t t) |
Sets this date to the specified time_t value. | |
std::time_t | getTime () const |
Returns the time_t value of 00:00:00 at this date. | |
void | parse (const std::string &str) |
Sets this date from a string in the YYYY-MM-DD format. | |
int | getYear () const |
Gets the year of this date. | |
int | getMonth () const |
Gets the month of this date. | |
int | getDay () const |
Gets the monthday of this date. | |
void | setYear (int year) |
Sets the year of this date. | |
void | setMonth (int month) |
Sets the month of this date. | |
void | setDay (int day) |
Sets the day of this date. | |
virtual std::string | toString () const |
Gets the date as a string in the YYYY-MM-DD format. | |
An SQL DATE.
|
explicit |
Constructor.
Sets this date to today.
odbc::Date::Date | ( | std::time_t | t | ) |
Constructor.
Sets this date to the specified time_t value.
odbc::Date::Date | ( | const std::string & | str | ) |
Constructor.
Sets this date to the specified string in the YYYY-MM-DD
format.