A day-month-year date class.
More...
#include <gdate.h>
|
enum class | Weekday {
sunday
, monday
, tuesday
, wednesday
,
thursday
, friday
, saturday
} |
|
enum class | Month {
january = 1
, february
, march
, april
,
may
, june
, july
, august
,
september
, october
, november
, december
} |
|
enum class | Format { yyyy_mm_dd_slash
, yyyy_mm_dd
, mm_dd
} |
|
A day-month-year date class.
- See also
- G::Time, G::DateTime
Definition at line 39 of file gdate.h.
◆ Format
enum class G::Date::Format |
|
strong |
◆ Month
enum class G::Date::Month |
|
strong |
◆ Weekday
enum class G::Date::Weekday |
|
strong |
◆ Date() [1/6]
Default constructor for the current date in the UTC timezone.
Definition at line 39 of file gdate.cpp.
◆ Date() [2/6]
Constructor for the current date in the local timezone.
Definition at line 59 of file gdate.cpp.
◆ Date() [3/6]
Constructor for the specified date.
Definition at line 54 of file gdate.cpp.
◆ Date() [4/6]
Constructor for the date in the UTC timezone as at the given epoch time.
Definition at line 44 of file gdate.cpp.
◆ Date() [5/6]
Constructor for the date in the local timezone as at the given epoch time.
Definition at line 49 of file gdate.cpp.
◆ Date() [6/6]
G::Date::Date |
( |
int |
year, |
|
|
Date::Month |
month, |
|
|
int |
day_of_month |
|
) |
| |
Constructor for the specified date.
Definition at line 64 of file gdate.cpp.
◆ dd()
std::string G::Date::dd |
( |
| ) |
const |
Returns the day of the month as a two-digit decimal string.
Definition at line 111 of file gdate.cpp.
◆ mm()
std::string G::Date::mm |
( |
| ) |
const |
Returns the month as a two-digit decimal string.
Definition at line 118 of file gdate.cpp.
◆ month()
G::Date::Month G::Date::month |
( |
| ) |
const |
Returns the month.
Definition at line 148 of file gdate.cpp.
◆ monthday()
int G::Date::monthday |
( |
| ) |
const |
Returns the day of the month.
Definition at line 106 of file gdate.cpp.
◆ monthName()
std::string G::Date::monthName |
( |
bool |
brief = false | ) |
const |
Returns the month as a string (in english).
Definition at line 153 of file gdate.cpp.
◆ operator!=()
bool G::Date::operator!= |
( |
const Date & |
rhs | ) |
const |
Comparison operator.
Definition at line 268 of file gdate.cpp.
◆ operator++()
Increments the date by one day.
Definition at line 182 of file gdate.cpp.
◆ operator--()
Decrements the date by one day.
Definition at line 205 of file gdate.cpp.
◆ operator==()
bool G::Date::operator== |
( |
const Date & |
rhs | ) |
const |
Comparison operator.
Definition at line 260 of file gdate.cpp.
◆ str()
std::string G::Date::str |
( |
Format |
format = Format::yyyy_mm_dd_slash | ) |
const |
Returns a string representation of the date.
Definition at line 84 of file gdate.cpp.
◆ weekday()
G::Date::Weekday G::Date::weekday |
( |
| ) |
const |
Returns the day of the week.
Definition at line 125 of file gdate.cpp.
◆ weekdayName()
std::string G::Date::weekdayName |
( |
bool |
brief = false | ) |
const |
Returns an english string representation of the day of the week.
Definition at line 136 of file gdate.cpp.
◆ year()
int G::Date::year |
( |
| ) |
const |
◆ yearLowerLimit()
int G::Date::yearLowerLimit |
( |
| ) |
|
|
static |
Returns the smallest supported year value.
Definition at line 34 of file gdate.cpp.
◆ yearUpperLimit()
int G::Date::yearUpperLimit |
( |
| ) |
|
|
static |
Returns the largest supported year value.
Definition at line 29 of file gdate.cpp.
◆ yyyy()
std::string G::Date::yyyy |
( |
| ) |
const |
Returns the year as a four-digit decimal string.
Definition at line 175 of file gdate.cpp.
The documentation for this class was generated from the following files:
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gdate.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gdate.cpp