alkimia  8.0.3
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
AlkDateFormat Class Reference

#include <alkdateformat.h>

Classes

class  Private
 

Public Types

enum  ErrorCode {
  NoError = 0 ,
  InvalidFormatString ,
  InvalidFormatCharacter ,
  InvalidDate ,
  InvalidDay ,
  InvalidMonth ,
  InvalidYear ,
  InvalidYearLength
}
 

Public Member Functions

 AlkDateFormat (const QString &format)
 
 ~AlkDateFormat ()
 
AlkDateFormatoperator= (const AlkDateFormat &)
 
QString convertDate (const QDate &date)
 
QDate convertString (const QString &date, bool strict=true, unsigned centuryMidPoint=QDate::currentDate().year())
 
const QString & format () const
 
QString lastErrorMessage () const
 
ErrorCode lastError () const
 

Private Attributes

Private *const d
 

Detailed Description

Universal date converter

In 'strict' mode, this is designed to be compatible with the QIF profile date converter. However, that converter deals with the concept of an apostrophe format in a way I don't understand. So for the moment, they are 99% compatible, waiting on that issue. (acejones)

Definition at line 39 of file alkdateformat.h.

Member Enumeration Documentation

◆ ErrorCode

Enumerator
NoError 
InvalidFormatString 
InvalidFormatCharacter 
InvalidDate 
InvalidDay 
InvalidMonth 
InvalidYear 
InvalidYearLength 

Definition at line 47 of file alkdateformat.h.

Constructor & Destructor Documentation

◆ AlkDateFormat()

AlkDateFormat::AlkDateFormat ( const QString &  format)
explicit

◆ ~AlkDateFormat()

AlkDateFormat::~AlkDateFormat ( )

Definition at line 426 of file alkdateformat.cpp.

References d.

Member Function Documentation

◆ convertDate()

QString AlkDateFormat::convertDate ( const QDate &  date)

◆ convertString()

QDate AlkDateFormat::convertString ( const QString &  date,
bool  strict = true,
unsigned  centuryMidPoint = QDate::currentDate().year() 
)

◆ format()

const QString & AlkDateFormat::format ( ) const

Definition at line 438 of file alkdateformat.cpp.

References d, and AlkDateFormat::Private::m_format.

Referenced by AlkDateFormat(), and AlkOnlineQuote::Private::parseDate().

◆ lastError()

AlkDateFormat::ErrorCode AlkDateFormat::lastError ( ) const

Definition at line 443 of file alkdateformat.cpp.

References d, and AlkDateFormat::Private::m_errorCode.

◆ lastErrorMessage()

QString AlkDateFormat::lastErrorMessage ( ) const

Definition at line 448 of file alkdateformat.cpp.

References d, and AlkDateFormat::Private::m_errorMessage.

◆ operator=()

AlkDateFormat & AlkDateFormat::operator= ( const AlkDateFormat right)

Definition at line 431 of file alkdateformat.cpp.

References d, and AlkDateFormat::Private::m_format.

Member Data Documentation

◆ d

Private* const AlkDateFormat::d
private

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