![]() |
CMGDK r49-rc2
|
日期类 更多...
#include <DateTime.H>
公有成员 | |
Date () | |
Date (int, int, int) | |
void | Sync () |
和系统日期同步 | |
bool | SaveToStream (Stream *) |
bool | LoadFromStream (Stream *) |
公有属性 | |
Property< int > | Year |
年 | |
Property< int > | Month |
月 | |
Property< int > | Day |
日 | |
Property< int > | MaxDays |
本月最大天数 | |
保护成员 | |
int | GetYear () |
int | GetMonth () |
int | GetDay () |
int | GetMaxDays () |
void | SetYear (int y) |
void | SetMonth (int) |
void | SetDay (int) |
void | InitPrivate () |
日期类
日期类,这个类用来保存和计算日期。带有闰年的处理
当您对Year,Month,Day中任意一个值进行修改时,其它值都会自动跟着计算。如1981-4-17,如果使用Day+=400,会自动计算出400天之后的日期,结果是1982-5-21
hgl::Date::Date | ( | ) |
int hgl::Date::GetDay | ( | ) | [inline, protected] |
int hgl::Date::GetMaxDays | ( | ) | [inline, protected] |
int hgl::Date::GetMonth | ( | ) | [inline, protected] |
int hgl::Date::GetYear | ( | ) | [inline, protected] |
void hgl::Date::InitPrivate | ( | ) | [protected] |
bool hgl::Date::LoadFromStream | ( | Stream * | str | ) | [virtual] |
bool hgl::Date::SaveToStream | ( | Stream * | str | ) | [virtual] |
void hgl::Date::SetDay | ( | int | d | ) | [protected] |
void hgl::Date::SetMonth | ( | int | m | ) | [protected] |
void hgl::Date::SetYear | ( | int | y | ) | [inline, protected] |
void hgl::Date::Sync | ( | ) |
和系统日期同步
本月最大天数