Woopsi 1.0
GUI Framework for Nintendo DS Homebrew
|
#include <date.h>
Public Member Functions | |
Date (u8 day, u8 month, u16 year) | |
~Date () | |
const WoopsiString & | getDayName () const |
const WoopsiString & | getMonthName () const |
const u8 | getWeekDay () const |
const bool | isLeapYear () const |
const u16 | getYearDays () |
const u8 | getMonthDays () const |
void | addYears (s16 years) |
void | addMonths (s16 months) |
void | addDays (s16 days) |
const u8 | getDay () const |
const u8 | getMonth () const |
const u16 | getYear () const |
void | setDate (u8 day, u8 month, u16 year) |
bool | operator== (const Date &date) const |
bool | operator!= (const Date &date) const |
Class representing a date.
WoopsiUI::Date::Date | ( | u8 | day, |
u8 | month, | ||
u16 | year | ||
) | [inline] |
Constructor.
day | The day of this date. |
month | The month of this date. |
year | The year of this date. |
WoopsiUI::Date::~Date | ( | ) | [inline] |
Destructor.
void WoopsiUI::Date::addDays | ( | s16 | days | ) |
Add a number of days to this date.
days | Number of days to add. |
void WoopsiUI::Date::addMonths | ( | s16 | months | ) |
Add a number of months to this date. Automatically rolls over years if necessary.
months | Number of months to add. |
void WoopsiUI::Date::addYears | ( | s16 | years | ) |
Add a number of years to this date.
years | Number of years to add. |
const u8 WoopsiUI::Date::getDay | ( | ) | const [inline] |
Get the day.
const WoopsiString& WoopsiUI::Date::getDayName | ( | ) | const [inline] |
Get the name of the current day.
const u8 WoopsiUI::Date::getMonth | ( | ) | const [inline] |
Get the month.
const u8 WoopsiUI::Date::getMonthDays | ( | ) | const |
Get the number of days in the current month.
const WoopsiString& WoopsiUI::Date::getMonthName | ( | ) | const [inline] |
Get the name of the current month.
const u8 WoopsiUI::Date::getWeekDay | ( | ) | const [inline] |
Get the integer value of the current day of the week. Value is 0-based where 0 represents Sunday and 6 represents Saturday.
const u16 WoopsiUI::Date::getYear | ( | ) | const [inline] |
Get the year.
const u16 WoopsiUI::Date::getYearDays | ( | ) | [inline] |
Get the number of days in the current year.
const bool WoopsiUI::Date::isLeapYear | ( | ) | const [inline] |
Returns true if the year is a leap year.
bool WoopsiUI::Date::operator!= | ( | const Date & | date | ) | const |
Overload the inequality operator.
bool WoopsiUI::Date::operator== | ( | const Date & | date | ) | const |
Overload the equals operator.
void WoopsiUI::Date::setDate | ( | u8 | day, |
u8 | month, | ||
u16 | year | ||
) |
Set the year.
day | The day. |
month | The month. |
year | The year. |