Public Types | Public Member Functions | Public Attributes | List of all members
Proud::CPnTimeSpan Class Reference

Public Types

enum  DateTimeSpanStatus { valid = 0, invalid = 1, null = 2 }
 

Public Member Functions

 CPnTimeSpan () throw ()
 
 CPnTimeSpan (double dblSpanSrc) throw ()
 
 CPnTimeSpan (int32_t lDays, int nHours, int nMins, int nSecs, int nMillisecs) throw ()
 
void SetStatus (DateTimeSpanStatus status) throw ()
 
DateTimeSpanStatus GetStatus () const throw ()
 
double GetTotalDays () const throw ()
 
double GetTotalHours () const throw ()
 
double GetTotalMinutes () const throw ()
 
double GetTotalSeconds () const throw ()
 
double GetTotalMilliseconds () const throw ()
 
int32_t GetDays () const throw ()
 
int32_t GetHours () const throw ()
 
int32_t GetMinutes () const throw ()
 
int32_t GetSeconds () const throw ()
 
int GetMilliseconds () const throw ()
 
CPnTimeSpanoperator= (double dblSpanSrc) throw ()
 
bool operator== (const CPnTimeSpan &dateSpan) const throw ()
 
bool operator!= (const CPnTimeSpan &dateSpan) const throw ()
 
bool operator< (const CPnTimeSpan &dateSpan) const throw ()
 
bool operator> (const CPnTimeSpan &dateSpan) const throw ()
 
bool operator<= (const CPnTimeSpan &dateSpan) const throw ()
 
bool operator>= (const CPnTimeSpan &dateSpan) const throw ()
 
CPnTimeSpan operator+ (const CPnTimeSpan &dateSpan) const throw ()
 
CPnTimeSpan operator- (const CPnTimeSpan &dateSpan) const throw ()
 
CPnTimeSpanoperator+= (const CPnTimeSpan dateSpan) throw ()
 
CPnTimeSpanoperator-= (const CPnTimeSpan dateSpan) throw ()
 
CPnTimeSpan operator- () const throw ()
 
void SetDateTimeSpan (int32_t lDays, int nHours, int nMins, int nSecs, int nMillisecs) throw ()
 
String Format (const TCHAR *pFormat) const
 
String Format (uint32_t nID) const
 
void CheckRange ()
 

Public Attributes

double m_span
 
DateTimeSpanStatus m_status
 

Detailed Description

Time difference between two different dates

Constructor & Destructor Documentation

Proud::CPnTimeSpan::CPnTimeSpan ( ) throw ()

Constructor

Proud::CPnTimeSpan::CPnTimeSpan ( double  dblSpanSrc) throw ()

Constructor

Proud::CPnTimeSpan::CPnTimeSpan ( int32_t  lDays,
int  nHours,
int  nMins,
int  nSecs,
int  nMillisecs 
) throw ()

Constructor

Member Function Documentation

String Proud::CPnTimeSpan::Format ( const TCHAR *  pFormat) const

Converts date and time into text string

String Proud::CPnTimeSpan::Format ( uint32_t  nID) const

Converts date and time into text string

int32_t Proud::CPnTimeSpan::GetDays ( ) const throw ()

Gets day,hour,minute,second.

int32_t Proud::CPnTimeSpan::GetHours ( ) const throw ()

Gets day,hour,minute,second.

int32_t Proud::CPnTimeSpan::GetMinutes ( ) const throw ()

Gets day,hour,minute,second.

int32_t Proud::CPnTimeSpan::GetSeconds ( ) const throw ()

Gets day,hour,minute,second.

double Proud::CPnTimeSpan::GetTotalDays ( ) const throw ()

Converts into day,hour,minute,second,millisecond format.

double Proud::CPnTimeSpan::GetTotalHours ( ) const throw ()

Converts into day,hour,minute,second,millisecond format.

double Proud::CPnTimeSpan::GetTotalMilliseconds ( ) const throw ()

Converts into day,hour,minute,second,millisecond format.

double Proud::CPnTimeSpan::GetTotalMinutes ( ) const throw ()

Converts into day,hour,minute,second,millisecond format.

double Proud::CPnTimeSpan::GetTotalSeconds ( ) const throw ()

Converts into day,hour,minute,second,millisecond format.

bool Proud::CPnTimeSpan::operator!= ( const CPnTimeSpan dateSpan) const throw ()

Comparison operator

CPnTimeSpan Proud::CPnTimeSpan::operator+ ( const CPnTimeSpan dateSpan) const throw ()

Four-fundamental operator for date

CPnTimeSpan& Proud::CPnTimeSpan::operator+= ( const CPnTimeSpan  dateSpan) throw ()

Four-fundamental operator for date

CPnTimeSpan Proud::CPnTimeSpan::operator- ( const CPnTimeSpan dateSpan) const throw ()

Four-fundamental operator for date

CPnTimeSpan Proud::CPnTimeSpan::operator- ( ) const throw ()

Four-fundamental operator for date

CPnTimeSpan& Proud::CPnTimeSpan::operator-= ( const CPnTimeSpan  dateSpan) throw ()

Four-fundamental operator for date

bool Proud::CPnTimeSpan::operator< ( const CPnTimeSpan dateSpan) const throw ()

Comparison operator

bool Proud::CPnTimeSpan::operator<= ( const CPnTimeSpan dateSpan) const throw ()

Comparison operator

CPnTimeSpan& Proud::CPnTimeSpan::operator= ( double  dblSpanSrc) throw ()

Copy assignment operator

bool Proud::CPnTimeSpan::operator== ( const CPnTimeSpan dateSpan) const throw ()

Comparison operator

bool Proud::CPnTimeSpan::operator> ( const CPnTimeSpan dateSpan) const throw ()

Comparison operator

bool Proud::CPnTimeSpan::operator>= ( const CPnTimeSpan dateSpan) const throw ()

Comparison operator

void Proud::CPnTimeSpan::SetDateTimeSpan ( int32_t  lDays,
int  nHours,
int  nMins,
int  nSecs,
int  nMillisecs 
) throw ()

Setting date and time