首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

不用ctime coledatetime怎么办时间

2012-02-01 
不用ctime coledatetime怎么处理时间?比如已知2007年1月1日,怎样得到是星期几?GetDayOfWeek等等.不使用和M

不用ctime coledatetime怎么处理时间?
比如已知2007年1月1日,怎样得到是星期几?GetDayOfWeek等等.
不使用和MFC相关的东西.

[解决办法]
struct tm {
int tm_sec; /* seconds after the minute - [0,59] */
int tm_min; /* minutes after the hour - [0,59] */
int tm_hour; /* hours since midnight - [0,23] */
int tm_mday; /* day of the month - [1,31] */
int tm_mon; /* months since January - [0,11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday - [0,6] */
int tm_yday; /* days since January 1 - [0,365] */
int tm_isdst; /* daylight savings time flag */
};
中的tm_wday

热点排行