C++中Ctime头文件包含哪些函数,怎么使用?
1个回答
2013-07-14
展开全部
CTime Constructs CTime objects in various ways.
GetCurrentTime Creates a CTime object that represents the current time (static member function).
Extraction GetTime Returns a time_t that corresponds to this CTime object.
GetYear Returns the year that this CTime object represents.
GetMonth Returns the month that this CTime object represents (1 through 12).
GetDay Returns the day that this CTime object represents (1 through 31).
GetHour Returns the hour that this CTime object represents (0 through 23).
GetMinute Returns the minute that this CTime object represents (0 through 59).
GetSecond Returns the second that this CTime object represents (0 through 59).
GetDayOfWeek Returns the day of the week (1 for Sunday, 2 for Monday, and so forth).
Conversion GetGmtTm Breaks down a CTime object into components — based on UTC.
GetLocalTm Breaks down a CTime object into components — based on the local time zone.
GetAsSystemTime Converts the time information stored in the CTime object to a Win32-compatibleSYSTEMTIME structure
Format Converts a CTime object into a formatted string — based on the local time zone.
FormatGmt Converts a CTime object into a formatted string — based on UTC.
Operators operator = Assigns new time values.
operator + – Add and subtract CTimeSpan and CTime objects.
operator +=, –= Add and subtract a CTimeSpan object to and from this CTime object.
operator ==, < , etc. Compare two absolute times.
Archive/Dump operator << Outputs a CTime object to CArchive or CDumpContext.
operator >> Inputs a CTime object from CArchive.
GetCurrentTime Creates a CTime object that represents the current time (static member function).
Extraction GetTime Returns a time_t that corresponds to this CTime object.
GetYear Returns the year that this CTime object represents.
GetMonth Returns the month that this CTime object represents (1 through 12).
GetDay Returns the day that this CTime object represents (1 through 31).
GetHour Returns the hour that this CTime object represents (0 through 23).
GetMinute Returns the minute that this CTime object represents (0 through 59).
GetSecond Returns the second that this CTime object represents (0 through 59).
GetDayOfWeek Returns the day of the week (1 for Sunday, 2 for Monday, and so forth).
Conversion GetGmtTm Breaks down a CTime object into components — based on UTC.
GetLocalTm Breaks down a CTime object into components — based on the local time zone.
GetAsSystemTime Converts the time information stored in the CTime object to a Win32-compatibleSYSTEMTIME structure
Format Converts a CTime object into a formatted string — based on the local time zone.
FormatGmt Converts a CTime object into a formatted string — based on UTC.
Operators operator = Assigns new time values.
operator + – Add and subtract CTimeSpan and CTime objects.
operator +=, –= Add and subtract a CTimeSpan object to and from this CTime object.
operator ==, < , etc. Compare two absolute times.
Archive/Dump operator << Outputs a CTime object to CArchive or CDumpContext.
operator >> Inputs a CTime object from CArchive.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询