MikroCAD SDK Library
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CDateTime Class Reference

Description

DateTime class.

Public Member Functions

 CDateTime ()
 Standard constructor.
 
 CDateTime (DWORD dwDate)
 Constructor with date. More...
 
 CDateTime (ULONGLONG ulDateTime)
 Constructor with date time. More...
 
 CDateTime (WORD wYear, WORD wMonth, WORD wDay)
 Constructor with year, month, day. More...
 
 CDateTime (WORD wYear, WORD wMonth, WORD wDay, WORD wHour, WORD wMin, WORD wSec=0, WORD wSec100=0)
 Constructor with year, month, day, hour, minute, second, hundredth second. More...
 
wstring DateString (eDateFormat Format)
 Date as string. More...
 
wstring DateString (wstring stFormat)
 Date as string. More...
 
WORD GetDay ()
 Get day.
 
WORD GetHour ()
 Get hour.
 
WORD GetHundredthSecond ()
 Get hundredth second.
 
WORD GetMinute ()
 Get minute.
 
WORD GetMonth ()
 Get Month.
 
WORD GetSecond ()
 Get second.
 
WORD GetYear ()
 Get year.
 
void Initialize ()
 Initialize.
 
void Initialize (DWORD dwDate)
 Initialize with date. More...
 
void Initialize (ULONGLONG ulDateTime)
 Initialize with date time. More...
 
void Initialize (WORD wYear, WORD wMonth, WORD wDay)
 Initialize with year, month, day. More...
 
void Initialize (WORD wYear, WORD wMonth, WORD wDay, WORD wHour, WORD wMin, WORD wSec=0, WORD wSec100=0)
 Initialize with year, month, day, hour, minute, second, hundredth second. More...
 
CDateTimeoperator= (const CDateTime &DateTime)
 Copy operator.
 
wstring TimeString (eTimeFormat Format)
 Time as string. More...
 
wstring TimeString (wstring stFormat)
 Time as string. More...
 

Static Public Member Functions

static DWORD DateAsBinary (CDateTime &DateTime)
 Convert Date time object to DWORD (time is unconsidered) More...
 
static wstring DateAsStandardString (CDateTime &DateTime)
 Convert Date time to standard string(time is unconsidered) More...
 
static CDateTime DateFromBinary (DWORD dwDate)
 Convert DWORD to Date time object (time is unconsidered) More...
 
static bool DateFromStandardString (wstring stDate, CDateTime &Date)
 Convert standard string to Date time object to DWORD (time is unconsidered) More...
 
static ULONGLONG DateTimeAsBinary (CDateTime &DateTime)
 Convert DateTime object to ULONGLONG (time is unconsidered) More...
 
static double DateTimeAsDouble (CDateTime &DateTime)
 Convert DateTime object to double. More...
 
static wstring DateTimeAsStandardString (CDateTime &DateTime)
 Convert DateTime object to standard wide string (time is unconsidered) More...
 
static string DateTimeAsStandardStringA (CDateTime &DateTime)
 Convert DateTime object to standard string (time is unconsidered) More...
 
static CDateTime DateTimeFromBinary (ULONGLONG ulDateTime)
 Convert ULONGLONG to DateTime object (time is unconsidered) More...
 
static bool DateTimeFromStandardString (wstring stDateTime, CDateTime &DateTime)
 Convert standard string to Date time object to DWORD. More...
 
static bool IsLeapYear (WORD wYear)
 Is year a leap year. More...
 
static CDateTime Now ()
 Get current date time.
 

Constructor & Destructor Documentation

CDateTime::CDateTime ( DWORD  dwDate)

Constructor with date.

Parameters
dwDateDate
CDateTime::CDateTime ( ULONGLONG  ulDateTime)

Constructor with date time.

Parameters
ulDateTimeDate time
CDateTime::CDateTime ( WORD  wYear,
WORD  wMonth,
WORD  wDay 
)

Constructor with year, month, day.

Parameters
wYearYear
wMonthMonth
wDayDay
CDateTime::CDateTime ( WORD  wYear,
WORD  wMonth,
WORD  wDay,
WORD  wHour,
WORD  wMin,
WORD  wSec = 0,
WORD  wSec100 = 0 
)

Constructor with year, month, day, hour, minute, second, hundredth second.

Parameters
wYearYear
wMonthMonth
wDayDay
wHourHour
wMinMinute
wSecSecond
wSec100Hundredth second

Member Function Documentation

static DWORD CDateTime::DateAsBinary ( CDateTime DateTime)
static

Convert Date time object to DWORD (time is unconsidered)

Parameters
DateTimeDateTime object
Returns
DateTime as DWORD
static wstring CDateTime::DateAsStandardString ( CDateTime DateTime)
static

Convert Date time to standard string(time is unconsidered)

Parameters
DateTimeDateTime object
Returns
DateTime as string
static CDateTime CDateTime::DateFromBinary ( DWORD  dwDate)
static

Convert DWORD to Date time object (time is unconsidered)

Parameters
dwDateDate
Returns
new DateTime object
static bool CDateTime::DateFromStandardString ( wstring  stDate,
CDateTime Date 
)
static

Convert standard string to Date time object to DWORD (time is unconsidered)

Parameters
stDateDate as standard string
DateOutput date
Returns
Success
wstring CDateTime::DateString ( eDateFormat  Format)

Date as string.

Parameters
FormatPre-defined format
Returns
Date as string
wstring CDateTime::DateString ( wstring  stFormat)

Date as string.

Parameters
stFormatUser-defined format
Returns
Date as string
static ULONGLONG CDateTime::DateTimeAsBinary ( CDateTime DateTime)
static

Convert DateTime object to ULONGLONG (time is unconsidered)

Parameters
DateTimeDate Time
Returns
DateTime as ULONGLONG
static double CDateTime::DateTimeAsDouble ( CDateTime DateTime)
static

Convert DateTime object to double.

Parameters
DateTimeDate Time
Returns
DateTime as double
static wstring CDateTime::DateTimeAsStandardString ( CDateTime DateTime)
static

Convert DateTime object to standard wide string (time is unconsidered)

Parameters
DateTimeDate Time
Returns
DateTime as string
static string CDateTime::DateTimeAsStandardStringA ( CDateTime DateTime)
static

Convert DateTime object to standard string (time is unconsidered)

Parameters
DateTimeDate Time
Returns
DateTime as string
static CDateTime CDateTime::DateTimeFromBinary ( ULONGLONG  ulDateTime)
static

Convert ULONGLONG to DateTime object (time is unconsidered)

Parameters
ulDateTimeDate as ULONGLONG
Returns
new DateTime object
static bool CDateTime::DateTimeFromStandardString ( wstring  stDateTime,
CDateTime DateTime 
)
static

Convert standard string to Date time object to DWORD.

Parameters
stDateTimeDate and time as standard string
DateTimeOutput date
Returns
Success
void CDateTime::Initialize ( DWORD  dwDate)

Initialize with date.

Parameters
dwDateDate
void CDateTime::Initialize ( ULONGLONG  ulDateTime)

Initialize with date time.

Parameters
ulDateTimeDate time
void CDateTime::Initialize ( WORD  wYear,
WORD  wMonth,
WORD  wDay 
)

Initialize with year, month, day.

Parameters
wYearYear
wMonthMonth
wDayDay
void CDateTime::Initialize ( WORD  wYear,
WORD  wMonth,
WORD  wDay,
WORD  wHour,
WORD  wMin,
WORD  wSec = 0,
WORD  wSec100 = 0 
)

Initialize with year, month, day, hour, minute, second, hundredth second.

Parameters
wYearYear
wMonthMonth
wDayDay
wHourHour
wMinMinute
wSecSecond
wSec100Hundredth second
static bool CDateTime::IsLeapYear ( WORD  wYear)
static

Is year a leap year.

Parameters
wYearYear
Returns
Is leap year
wstring CDateTime::TimeString ( eTimeFormat  Format)

Time as string.

Parameters
FormatPre-defined format
Returns
Time as string
wstring CDateTime::TimeString ( wstring  stFormat)

Time as string.

Parameters
stFormatUser-defined format
Returns
Time as string

The documentation for this class was generated from the following file: