A date operation class.
More...
|
static int | day_of_week (int year, int month, int day) |
|
static unsigned | year_days (const unsigned year) |
| the number of days in the specified year. More...
|
|
static unsigned | month_days (const unsigned year, const unsigned month) |
| the number of days in the specified month. More...
|
|
static unsigned | day_in_year (unsigned y, unsigned m, unsigned d) |
| Returns the index of the specified day in this year, at range[1, 365] or [1, 366]. More...
|
|
A date operation class.
- See Also
- nana::date_chooser
the initialized date is today.
nana::date::date |
( |
const std::tm & |
t | ) |
|
|
explicit |
nana::date::date |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| |
unsigned nana::date::day_in_year |
( |
unsigned |
y, |
|
|
unsigned |
m, |
|
|
unsigned |
d |
|
) |
| |
|
static |
Returns the index of the specified day in this year, at range[1, 365] or [1, 366].
int nana::date::day_of_week |
( |
| ) |
const |
int nana::date::day_of_week |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| |
|
static |
unsigned nana::date::month_days |
( |
const unsigned |
year, |
|
|
const unsigned |
month |
|
) |
| |
|
static |
the number of days in the specified month.
bool nana::date::operator!= |
( |
const date & |
r | ) |
const |
date nana::date::operator+ |
( |
int |
off | ) |
const |
date nana::date::operator- |
( |
int |
off | ) |
const |
Initial value:{
if(1601 <= year && year < 30827 && 0 < month && month < 13 && day > 0)
{
return;
}
static unsigned month_days(const unsigned year, const unsigned month)
the number of days in the specified month.
Definition: datetime.cpp:242
void set(const std::tm &)
Definition: datetime.cpp:54
bool nana::date::operator< |
( |
const date & |
r | ) |
const |
bool nana::date::operator<= |
( |
const date & |
r | ) |
const |
bool nana::date::operator== |
( |
const date & |
r | ) |
const |
bool nana::date::operator> |
( |
const date & |
r | ) |
const |
bool nana::date::operator>= |
( |
const date & |
r | ) |
const |
void nana::date::set |
( |
const std::tm & |
t | ) |
|
unsigned nana::date::year_days |
( |
const unsigned |
year | ) |
|
|
static |
the number of days in the specified year.