#include <BDate.h>
Public Member Functions | |
| BDate (int year=0, int month=1, int day=1) | |
| BDate (BString str) | |
| ~BDate () | |
| void | clear () |
| Clear the date/time. | |
| void | setFirst () |
| Set the first date available. | |
| void | setLast () |
| Set the last date available. | |
| void | set (time_t time) |
| Set time using Unix time (seconds from 1970-01-01). | |
| void | set (int year=0, int month=1, int day=1) |
| void | setYDay (int year=0, int yday=0) |
| void | setNow () |
| Set the timeStamp to now. | |
| int | year () |
| int | yday () |
| int | month () |
| int | day () |
| void | getDate (int &year, int &mon, int &day) |
| BString | getString () |
| Get the time as an ISO date/time string. | |
| BString | getStringFormatted (BString format) |
| Gets the time in a string form as per the format. Format syntax as per strftime(). | |
| BError | setString (BString str) |
| Set the time from an ISO date/time. | |
| int | isSet () |
| int | compare (const BDate &date) const |
| Compare two dates. | |
| operator BString () | |
| int | operator== (const BDate &date) const |
| int | operator!= (const BDate &date) const |
| int | operator> (const BDate &date) const |
| int | operator>= (const BDate &date) const |
| int | operator< (const BDate &date) const |
| int | operator<= (const BDate &date) const |
Static Public Member Functions | |
| static int | isLeap (int year) |
| static int | daysInMonth (int year, int month) |
Public Attributes | |
| uint16_t | oyear |
| Year (0 .. 65535). | |
| uint16_t | oyday |
| Day in year (0 .. 365). | |
| BDate::BDate | ( | int | year = 0, |
|
| int | month = 1, |
|||
| int | day = 1 | |||
| ) |
| BDate::BDate | ( | BString | str | ) |
| BDate::~BDate | ( | ) |
| void BDate::clear | ( | ) |
Clear the date/time.
| int BDate::compare | ( | const BDate & | date | ) | const |
Compare two dates.
| int BDate::day | ( | ) |
| int BDate::daysInMonth | ( | int | year, | |
| int | month | |||
| ) | [static] |
| void BDate::getDate | ( | int & | year, | |
| int & | mon, | |||
| int & | day | |||
| ) |
| BString BDate::getString | ( | ) |
Get the time as an ISO date/time string.
Gets the time in a string form as per the format. Format syntax as per strftime().
| int BDate::isLeap | ( | int | year | ) | [static] |
| int BDate::isSet | ( | ) | [inline] |
| int BDate::month | ( | ) |
| BDate::operator BString | ( | ) | [inline] |
| int BDate::operator!= | ( | const BDate & | date | ) | const [inline] |
| int BDate::operator< | ( | const BDate & | date | ) | const [inline] |
| int BDate::operator<= | ( | const BDate & | date | ) | const [inline] |
| int BDate::operator== | ( | const BDate & | date | ) | const [inline] |
| int BDate::operator> | ( | const BDate & | date | ) | const [inline] |
| int BDate::operator>= | ( | const BDate & | date | ) | const [inline] |
| void BDate::set | ( | int | year = 0, |
|
| int | month = 1, |
|||
| int | day = 1 | |||
| ) |
| void BDate::set | ( | time_t | time | ) |
Set time using Unix time (seconds from 1970-01-01).
| void BDate::setFirst | ( | ) |
Set the first date available.
| void BDate::setLast | ( | ) |
Set the last date available.
| void BDate::setNow | ( | ) |
Set the timeStamp to now.
| void BDate::setYDay | ( | int | year = 0, |
|
| int | yday = 0 | |||
| ) |
| int BDate::yday | ( | ) |
| int BDate::year | ( | ) |
| uint16_t BDate::oyday |
Day in year (0 .. 365).
| uint16_t BDate::oyear |
Year (0 .. 65535).
1.6.1