Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# WoopsiUI::Date Class Reference

`#include <date.h>`

List of all members.

## 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

## Detailed Description

Class representing a date.

## Constructor & Destructor Documentation

WoopsiUI::Date::Date | ( | u8 | day,
|  | u8 | month,
|  | u16 | year
| ) |  | `[inline]`

Constructor.

Parameters:

  day | The day of this date.
  month | The month of this date.
  year | The year of this date.

WoopsiUI::Date::~Date | ( |  | ) | `[inline]`

Destructor.

## Member Function Documentation

void WoopsiUI::Date::addDays | ( | s16 | days | ) |

Add a number of days to this date.

Parameters:

  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.

Parameters:

  months | Number of months to add.

void WoopsiUI::Date::addYears | ( | s16 | years | ) |

Add a number of years to this date.

Parameters:

  years | Number of years to add.

const u8 WoopsiUI::Date::getDay | ( |  | ) | const`[inline]`

Get the day.

Returns:
  The day.

const WoopsiString& WoopsiUI::Date::getDayName | ( |  | ) | const`[inline]`

Get the name of the current day.

Returns:
  The name of the current day.

const u8 WoopsiUI::Date::getMonth | ( |  | ) | const`[inline]`

Get the month.

Returns:
  The month.

const u8 WoopsiUI::Date::getMonthDays | ( |  | ) | const

Get the number of days in the current month.

Returns:
  The number of days in the current month.

const WoopsiString& WoopsiUI::Date::getMonthName | ( |  | ) | const`[inline]`

Get the name of the current month.

Returns:
  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.

Returns:
  The current day of the week.

const u16 WoopsiUI::Date::getYear | ( |  | ) | const`[inline]`

Get the year.

Returns:
  The year.

const u16 WoopsiUI::Date::getYearDays | ( |  | ) | `[inline]`

Get the number of days in the current year.

Returns:
  The number of days in the current year.

const bool WoopsiUI::Date::isLeapYear | ( |  | ) | const`[inline]`

Returns true if the year is a leap year.

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.

Parameters:

  day | The day.
  month | The month.
  year | The year.

The documentation for this class was generated from the following file:

- date.h