Detailed Description
The Date class wraps the C fiftyoneDegreesDate structure and is used to represent dates in engines.
This is a memory efficient way to store a date.
Usage Example
std::stringstream stream;
// Format a string representation of a date in the format DD/MM/YYY
stream << date->getDay() << "/"
<< date->getMonth() << "/"
<< date->getYear();
string dateString = stream.str();
The Date class wraps the C fiftyoneDegreesDate structure and is used to represent dates in engines.
Definition Date.hpp:49
Public Member Functions | |
Constructors | |
| Date () | |
| Construct a "null" date with year, month and day all set to zero. | |
| Date (const fiftyoneDegreesDate *date) | |
| Construct a date from a C date structure. | |
Getters | |
| int | getYear () const |
| Get the year. | |
| int | getMonth () const |
| Get the month. | |
| int | getDay () const |
| Get the day of the month. | |
Constructor & Destructor Documentation
◆ Date()
| FiftyoneDegrees::Common::Date::Date | ( | const fiftyoneDegreesDate * | date | ) |
Construct a date from a C date structure.
This copies the date date structure so the argument can be freed after construction.
- Parameters
-
date pointer to copy to the underlying date structure
Member Function Documentation
◆ getDay()
| int FiftyoneDegrees::Common::Date::getDay | ( | ) | const |
Get the day of the month.
- Returns
- day of the month
◆ getMonth()
| int FiftyoneDegrees::Common::Date::getMonth | ( | ) | const |
Get the month.
- Returns
- month
◆ getYear()
| int FiftyoneDegrees::Common::Date::getYear | ( | ) | const |
Get the year.
- Returns
- year
The documentation for this class was generated from the following file:
