| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions
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...
CDateTime & | operator= (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

  dwDate | Date

CDateTime::CDateTime | ( | ULONGLONG | ulDateTime | ) |

Constructor with date time.

Parameters

  ulDateTime | Date time

CDateTime::CDateTime | ( | WORD | wYear,
|  | WORD | wMonth,
|  | WORD | wDay
| ) |  |

Constructor with year, month, day.

Parameters

  wYear | Year
  wMonth | Month
  wDay | Day

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

  wYear | Year
  wMonth | Month
  wDay | Day
  wHour | Hour
  wMin | Minute
  wSec | Second
  wSec100 | Hundredth second

## Member Function Documentation

static DWORD CDateTime::DateAsBinary | ( | CDateTime & | DateTime | ) |
| static

Convert Date time object to DWORD (time is unconsidered)

Parameters

  DateTime | DateTime object

Returns
  DateTime as DWORD

static wstring CDateTime::DateAsStandardString | ( | CDateTime & | DateTime | ) |
| static

Convert Date time to standard string(time is unconsidered)

Parameters

  DateTime | DateTime object

Returns
  DateTime as string

static CDateTime CDateTime::DateFromBinary | ( | DWORD | dwDate | ) |
| static

Convert DWORD to Date time object (time is unconsidered)

Parameters

  dwDate | Date

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

  stDate | Date as standard string
  Date | Output date

Returns
  Success

wstring CDateTime::DateString | ( | eDateFormat | Format | ) |

Date as string.

Parameters

  Format | Pre-defined format

Returns
  Date as string

wstring CDateTime::DateString | ( | wstring | stFormat | ) |

Date as string.

Parameters

  stFormat | User-defined format

Returns
  Date as string

static ULONGLONG CDateTime::DateTimeAsBinary | ( | CDateTime & | DateTime | ) |
| static

Convert DateTime object to ULONGLONG (time is unconsidered)

Parameters

  DateTime | Date Time

Returns
  DateTime as ULONGLONG

static double CDateTime::DateTimeAsDouble | ( | CDateTime & | DateTime | ) |
| static

Convert DateTime object to double.

Parameters

  DateTime | Date Time

Returns
  DateTime as double

static wstring CDateTime::DateTimeAsStandardString | ( | CDateTime & | DateTime | ) |
| static

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

Parameters

  DateTime | Date Time

Returns
  DateTime as string

static string CDateTime::DateTimeAsStandardStringA | ( | CDateTime & | DateTime | ) |
| static

Convert DateTime object to standard string (time is unconsidered)

Parameters

  DateTime | Date Time

Returns
  DateTime as string

static CDateTime CDateTime::DateTimeFromBinary | ( | ULONGLONG | ulDateTime | ) |
| static

Convert ULONGLONG to DateTime object (time is unconsidered)

Parameters

  ulDateTime | Date 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

  stDateTime | Date and time as standard string
  DateTime | Output date

Returns
  Success

void CDateTime::Initialize | ( | DWORD | dwDate | ) |

Initialize with date.

Parameters

  dwDate | Date

void CDateTime::Initialize | ( | ULONGLONG | ulDateTime | ) |

Initialize with date time.

Parameters

  ulDateTime | Date time

void CDateTime::Initialize | ( | WORD | wYear,
|  | WORD | wMonth,
|  | WORD | wDay
| ) |  |

Initialize with year, month, day.

Parameters

  wYear | Year
  wMonth | Month
  wDay | Day

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

  wYear | Year
  wMonth | Month
  wDay | Day
  wHour | Hour
  wMin | Minute
  wSec | Second
  wSec100 | Hundredth second

static bool CDateTime::IsLeapYear | ( | WORD | wYear | ) |
| static

Is year a leap year.

Parameters

  wYear | Year

Returns
  Is leap year

wstring CDateTime::TimeString | ( | eTimeFormat | Format | ) |

Time as string.

Parameters

  Format | Pre-defined format

Returns
  Time as string

wstring CDateTime::TimeString | ( | wstring | stFormat | ) |

Time as string.

Parameters

  stFormat | User-defined format

Returns
  Time as string

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

- DateTime.h