E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
G::Date Class Reference

A date (dd/mm/yyyy) class. More...

`#include <gdate.h>`

## Classes
class | LocalTime
| An overload discriminator class for Date constructors. More...

## Public Types
enum | Weekday { sunday, monday, tuesday, wednesday, thursday, friday, saturday }
enum | Month { january = 1, february, march, april, may, june, july, august, september, october, november, december }
enum | Format { yyyy_mm_dd_slash, yyyy_mm_dd, mm_dd }

## Public Member Functions
| Date ()
| Default constructor for the current date in the UTC timezone. More...
| Date (const LocalTime &)
| Constructor for the current date in the local timezone. More...
| Date (const G::DateTime::BrokenDownTime &tm)
| Constructor for the specified date.
| Date (G::EpochTime t)
| Constructor for the date in the UTC timezone as at the given epoch time. More...
| Date (G::EpochTime t, const LocalTime &)
| Constructor for the date in the local timezone as at the given epoch time. More...
| Date (int year, Month month, int day_of_month)
| Constructor for the specified date.
std::string | string (Format format=yyyy_mm_dd_slash) const
| Returns a string representation of the date.
Weekday | weekday () const
| Returns the day of the week.
std::string | weekdayName (bool brief=false) const
| Returns an english string representation of the day of the week. More...
int | monthday () const
| Returns the day of the month.
std::string | dd () const
| Returns the day of the month as a two-digit decimal string.
Month | month () const
| Returns the month.
std::string | monthName (bool brief=false) const
| Returns the month as a string (in english).
std::string | mm () const
| Returns the month as a two-digit decimal string.
int | year () const
| Returns the year.
std::string | yyyy () const
| Returns the year as a four-digit decimal string.
Date & | operator++ ()
| Increments the date by one day.
Date & | operator-- ()
| Decrements the date by one day.
bool | operator== (const Date &rhs) const
| Comparison operator.
bool | operator!= (const Date &rhs) const
| Comparison operator.

## Static Public Member Functions
static int | yearUpperLimit ()
| Returns the largest supported year value.
static int | yearLowerLimit ()
| Returns the smallest supported year value.

## Detailed Description

A date (dd/mm/yyyy) class.

See also
  G::Time, G::DateTime

Definition at line 39 of file gdate.h.

## Constructor & Destructor Documentation

G::Date::Date | ( |  | ) |

Default constructor for the current date in the UTC timezone.

Definition at line 38 of file gdate.cpp.

G::Date::Date | ( | const LocalTime & |  | ) |
| explicit

Constructor for the current date in the local timezone.

Definition at line 58 of file gdate.cpp.

G::Date::Date | ( | G::EpochTime | t | ) |
| explicit

Constructor for the date in the UTC timezone as at the given epoch time.

Definition at line 43 of file gdate.cpp.

G::Date::Date | ( | G::EpochTime | t,
|  | const LocalTime & |
| ) |  |

Constructor for the date in the local timezone as at the given epoch time.

Definition at line 48 of file gdate.cpp.

## Member Function Documentation

std::string G::Date::weekdayName | ( | bool | brief = `false` | ) | const

Returns an english string representation of the day of the week.

Definition at line 153 of file gdate.cpp.

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

- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gdate.h
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gdate.cpp