|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CSystemTime { public: CSystemTime(); CSystemTime(const CSystemTime &source); CSystemTime( int nYear, int nMonth, int nDay, int nHours, int nMinutes, int nSeconds, int nMilliseconds); ~CSystemTime(); public: const CSystemTime &operator=(const CSystemTime &source); int GetYear(); int GetMonth(); int GetDay(); int GetHours(); int GetMinutes(); int GetSeconds(); int GetMilliseconds(); void SetYear(int nYear); void SetMonth(int nMonth); void SetDay(int nDay); void SetHours(int nHours); void SetMinutes(int nMinutes); void SetSeconds(int nSeconds); void SetMilliseconds(int nMilliseconds); public: void GetUtcTime(); bool ToLocalTime(); bool ToUtcTime(); CString Format(); CString Format(const WCHAR *pszFormat); bool Parse(const WCHAR *pszSource); bool Parse(const WCHAR *pszSource, const WCHAR *pszFormat); };
The system time.
Constructor/Destructor Summary | |
CSystemTime
();
����������Constructs the system time object. |
|
CSystemTime
(const CSystemTime &source);
����������Constructs the system time object from another system time object. |
|
CSystemTime
(int nYear, int nMonth, int nDay, int nHours, int nMinutes, int nSeconds, int nMilliseconds);
����������Constructs the system time object from the specified components. |
|
~CSystemTime
();
����������Destroys the system time object. |
Function Summary | |
const�CSystemTime�&
|
operator=
(const CSystemTime &source);
����������Assigns the specified system time object to this system time object. |
int
|
GetYear
();
����������Returns a year component of this system time object. |
int
|
GetMonth
();
����������Returns a month component of this system time object. |
int
|
GetDay
();
����������Returns a day component of this system time object. |
int
|
GetHours
();
����������Returns an hours component of this system time object. |
int
|
GetMinutes
();
����������Returns a minutes component of this system time object. |
int
|
GetSeconds
();
����������Returns a seconds component of this system time object. |
int
|
GetMilliseconds
();
����������Returns a milliseconds component of this system time object. |
void
|
SetYear
(int nYear);
����������Assigns a new value to the year component of this system time object. |
void
|
SetMonth
(int nMonth);
����������Assigns a new value to the month component of this system time object. |
void
|
SetDay
(int nDay);
����������Assigns a new value to the day component of this system time object. |
void
|
SetHours
(int nHours);
����������Assigns a new value to the hours component of this system time object. |
void
|
SetMinutes
(int nMinutes);
����������Assigns a new value to the minutes component of this system time object. |
void
|
SetSeconds
(int nSeconds);
����������Assigns a new value to the seconds component of this system time object. |
void
|
SetMilliseconds
(int nMilliseconds);
����������Assigns a new value to the milliseconds component of this system time object. |
void
|
GetUtcTime
();
����������Obtains current UTC time; assigns it as the new content to this system time object. |
bool
|
ToLocalTime
();
����������Extracts system time contained in this system time object; interprets it as UTC time; converts it to local time; assigns the conversion result as the new content of this system time object. |
bool
|
ToUtcTime
();
����������Extracts system time contained in this system time object; interprets it as local time; converts it to UTC time; assigns the conversion result as the new content of this system time object. |
CString
|
Format
();
����������Returns a string representation of this system time object using the default format. |
CString
|
Format
(const WCHAR *pszFormat);
����������Returns a string representation of this system time object using the specified format. |
bool
|
Parse
(const WCHAR *pszSource);
����������Parses the string representation of system time using the default format; assigns the result as the new content of this system time object. |
bool
|
Parse
(const WCHAR *pszSource, const WCHAR *pszFormat);
����������Parses the string representation of system time using the specified format; assigns the result as the new content of this system time object. |
Constructor/Destructor Detail |
CSystemTime();
Constructs the system time object.
CSystemTime(const CSystemTime &source);
Constructs the system time object from another system time object.
source
- the source system time objectCSystemTime( int nYear, int nMonth, int nDay, int nHours, int nMinutes, int nSeconds, int nMilliseconds);
Constructs the system time object from the specified components.
nYear
- the yearnMonth
- the month (1-based)nDay
- the day of the month (1-based)nHours
- hoursnMinutes
- minutesnSeconds
- secondsnMilliseconds
- milliseconds~CSystemTime();
Destroys the system time object.
Function Detail |
const CSystemTime &operator=(const CSystemTime &source);
Assigns the specified system time object to this system time object.
source
- the source system time object to assignint GetYear();
Returns a year component of this system time object.
int GetMonth();
Returns a month component of this system time object.
int GetDay();
Returns a day component of this system time object.
int GetHours();
Returns an hours component of this system time object.
int GetMinutes();
Returns a minutes component of this system time object.
int GetSeconds();
Returns a seconds component of this system time object.
int GetMilliseconds();
Returns a milliseconds component of this system time object.
void SetYear(int nYear);
Assigns a new value to the year component of this system time object.
nYear
- the new value for the year
component of this system time objectvoid SetMonth(int nMonth);
Assigns a new value to the month component of this system time object.
nMonth
- the new value for the month
component of this system time object (1-based)void SetDay(int nDay);
Assigns a new value to the day component of this system time object.
nDay
- the new value for the day
component of this system time object (1-based)void SetHours(int nHours);
Assigns a new value to the hours component of this system time object.
nHours
- the new value for the hours
component of this system time objectvoid SetMinutes(int nMinutes);
Assigns a new value to the minutes component of this system time object.
nMinutes
- the new value for the minutes
component of this system time objectvoid SetSeconds(int nSeconds);
Assigns a new value to the seconds component of this system time object.
nSeconds
- the new value for the seconds
component of this system time objectvoid SetMilliseconds(int nMilliseconds);
Assigns a new value to the milliseconds component of this system time object.
nMilliseconds
- the new value for the milliseconds
component of this system time objectvoid GetUtcTime();
Obtains current UTC time; assigns it as the new content to this system time object.
bool ToLocalTime();
Extracts system time contained in this system time object; interprets it as UTC time; converts it to local time; assigns the conversion result as the new content of this system time object.
true
if convesion succeeded;
false
otherwisebool ToUtcTime();
Extracts system time contained in this system time object; interprets it as local time; converts it to UTC time; assigns the conversion result as the new content of this system time object.
true
if convesion succeeded;
false
otherwiseCString Format();
Returns a string representation of this system time object using the default format.
The default format is platform-dependent and locale-dependent.
CString Format(const WCHAR *pszFormat);
Returns a string representation of this system time object using the specified format.
The format specification is a string which
consists of two parts. The first part represents the date format
and has syntax specified for the fourth argument
of the
GetDateFormat
function of Windows API.
The second part represents the time format
and has syntax as specified the fourth argument
of the
GetTimeFormat
function of Windows API.
There is no separator between two parts.
pszFormat
- the fomat stringbool Parse(const WCHAR *pszSource);
Parses the string representation of system time using the default format; assigns the result as the new content of this system time object.
This function is not supported in the current release of the toolkit.
pszSource
- the source string to parsetrue
if parsing succeeded;
false
otherwisebool Parse(const WCHAR *pszSource, const WCHAR *pszFormat);
Parses the string representation of system time using the specified format; assigns the result as the new content of this system time object.
This function is not fully implemented in the current release.
It requires the source format
"dd/MM/yy hh:mm:ss"
,
where the actual number of digits in each component may vary.
The format string actually supplied is ignored.
pszSource
- the source string to parsepszFormat
- the format stringtrue
if parsing succeeded;
false
otherwise
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |