Windows C++ Library
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
CDate Class Reference

#include <Date.hpp>

List of all members.

Public Types

enum  DateOrder { MONTH_DAY_YEAR = 0x0000, DAY_MONTH_YEAR = 0x0001, YEAR_MONTH_DAY = 0x0002 }
enum  Format { FMT_ISO = 0x0001, FMT_WIN_SHORT = 0x0002, FMT_WIN_LONG = 0x0003 }

Public Member Functions

 CDate ()
 CDate (WCL::Seconds tSecs)
 CDate (int iDay, int iMonth, int iYear)
void Set ()
void Set (WCL::Seconds tSecs)
void Set (int iDay, int iMonth, int iYear)
void Get (int &iDay, int &iMonth, int &iYear) const
void Day (int iDay)
int Day () const
void Month (int iMonth)
int Month () const
void Year (int iYear)
int Year () const
int DayOfWeek () const
int DaysInMonth () const
WCL::Seconds GetDateInSecs () const
CString DayOfWeekStr (bool bFullName) const
CString MonthStr (bool bFullName) const
CString ToString (int nFormat=FMT_WIN_SHORT) const
bool FromString (const tchar *pszDate)
bool operator== (const CDate &rRHS) const
bool operator!= (const CDate &rRHS) const
bool operator< (const CDate &rRHS) const
bool operator> (const CDate &rRHS) const
bool operator<= (const CDate &rRHS) const
bool operator>= (const CDate &rRHS) const
CDateSpan operator- (const CDate &rRHS) const
void operator+= (const CDateSpan &rRHS)
void operator-= (const CDateSpan &rRHS)

Static Public Member Functions

static CDate Min ()
static CDate Max ()
static CDate Current ()
static DateOrder DateFormatOrder ()
static CString FieldSeparator ()
static CString DayOfWeekName (int nDay, bool bFullName=true)
static CString MonthName (int nMonth, bool bFullName=true)

Static Public Attributes

static const int MIN_YEAR = 1901
static const int MAX_YEAR = 2099
static const int MIN_MONTH = 1
static const int MAX_MONTH = 12
static const int MIN_DAY = 1
static const int MAX_DAY = 31

Protected Member Functions

int DaysInMonth (int iMonth, int iYear) const

Protected Attributes

WCL::Seconds m_tDate

Friends

class CDateSpan
class CDateTime
void operator>> (WCL::IInputStream &rStream, CDate &rDate)
void operator<< (WCL::IOutputStream &rStream, const CDate &rDate)

Member Enumeration Documentation

Enumerator:
MONTH_DAY_YEAR 
DAY_MONTH_YEAR 
YEAR_MONTH_DAY 
Enumerator:
FMT_ISO 
FMT_WIN_SHORT 
FMT_WIN_LONG 

Constructor & Destructor Documentation

CDate::CDate ( int  iDay,
int  iMonth,
int  iYear 
)

Member Function Documentation

CDate CDate::Min ( ) [inline, static]
CDate CDate::Max ( ) [inline, static]
void CDate::Set ( )
void CDate::Set ( WCL::Seconds  tSecs) [inline]
void CDate::Set ( int  iDay,
int  iMonth,
int  iYear 
)
void CDate::Get ( int &  iDay,
int &  iMonth,
int &  iYear 
) const
void CDate::Day ( int  iDay) [inline]
int CDate::Day ( ) const [inline]
void CDate::Month ( int  iMonth) [inline]
int CDate::Month ( ) const [inline]
void CDate::Year ( int  iYear) [inline]
int CDate::Year ( ) const [inline]
int CDate::DayOfWeek ( ) const [inline]
int CDate::DaysInMonth ( ) const [inline]
WCL::Seconds CDate::GetDateInSecs ( ) const [inline]
CDate CDate::Current ( ) [static]
CString CDate::DayOfWeekName ( int  nDay,
bool  bFullName = true 
) [static]
CString CDate::MonthName ( int  nMonth,
bool  bFullName = true 
) [static]
CString CDate::DayOfWeekStr ( bool  bFullName) const
CString CDate::MonthStr ( bool  bFullName) const
CString CDate::ToString ( int  nFormat = FMT_WIN_SHORT) const
bool CDate::FromString ( const tchar *  pszDate)
bool CDate::operator== ( const CDate rRHS) const [inline]
bool CDate::operator!= ( const CDate rRHS) const [inline]
bool CDate::operator< ( const CDate rRHS) const [inline]
bool CDate::operator> ( const CDate rRHS) const [inline]
bool CDate::operator<= ( const CDate rRHS) const [inline]
bool CDate::operator>= ( const CDate rRHS) const [inline]
CDateSpan CDate::operator- ( const CDate rRHS) const [inline]
void CDate::operator+= ( const CDateSpan rRHS) [inline]
void CDate::operator-= ( const CDateSpan rRHS) [inline]
int CDate::DaysInMonth ( int  iMonth,
int  iYear 
) const [protected]

Friends And Related Function Documentation

friend class CDateSpan [friend]
friend class CDateTime [friend]
void operator>> ( WCL::IInputStream rStream,
CDate rDate 
) [friend]
void operator<< ( WCL::IOutputStream rStream,
const CDate rDate 
) [friend]

Member Data Documentation

const int CDate::MIN_YEAR = 1901 [static]
const int CDate::MAX_YEAR = 2099 [static]
const int CDate::MIN_MONTH = 1 [static]
const int CDate::MAX_MONTH = 12 [static]
const int CDate::MIN_DAY = 1 [static]
const int CDate::MAX_DAY = 31 [static]

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