#include <datetime.h>
Inheritance diagram for mysqlpp::Date:
Public Member Functions | |
Date () | |
Default constructor. | |
Date (short int y, tiny_int m, tiny_int d) | |
Initialize object. | |
Date (const Date &other) | |
Initialize object as a copy of another Date. | |
Date (const DateTime &other) | |
Initialize object from date part of date/time object. | |
Date (cchar *str) | |
Initialize object from a MySQL date string. | |
Date (const ColData &str) | |
Initialize object from a MySQL date string. | |
Date (const std::string &str) | |
Initialize object from a MySQL date string. | |
MYSQLPP_EXPORT short int | compare (const Date &other) const |
Compare this date to another. | |
MYSQLPP_EXPORT cchar * | convert (cchar *) |
Parse a MySQL date string into this object. | |
Public Attributes | |
short int | year |
the year | |
tiny_int | month |
the month, 1-12 | |
tiny_int | day |
the day, 1-31 |
Objects of this class can be inserted into streams, and initialized from MySQL DATE strings.
|
Initialize object from a MySQL date string. String must be in the YYYY-MM-DD format. It doesn't have to be zero-padded. |
|
Initialize object from a MySQL date string.
|
|
Initialize object from a MySQL date string.
|
|
Compare this date to another. Returns < 0 if this date is before the other, 0 of they are equal, and > 0 if this date is after the other. Implements mysqlpp::DTbase< Date >. |
|
the year No surprises; the year 2005 is stored as the integer 2005. |