|
alkimia
8.0.3
|
#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 () | |
| AlkDateFormat & | operator= (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 |
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.
| Enumerator | |
|---|---|
| NoError | |
| InvalidFormatString | |
| InvalidFormatCharacter | |
| InvalidDate | |
| InvalidDay | |
| InvalidMonth | |
| InvalidYear | |
| InvalidYearLength | |
Definition at line 47 of file alkdateformat.h.
|
explicit |
Definition at line 419 of file alkdateformat.cpp.
References d, format(), AlkDateFormat::Private::m_errorCode, AlkDateFormat::Private::m_format, and NoError.
| AlkDateFormat::~AlkDateFormat | ( | ) |
Definition at line 426 of file alkdateformat.cpp.
References d.
| QString AlkDateFormat::convertDate | ( | const QDate & | date | ) |
Definition at line 466 of file alkdateformat.cpp.
References d, AlkDateFormat::Private::m_errorCode, AlkDateFormat::Private::m_errorMessage, and NoError.
| QDate AlkDateFormat::convertString | ( | const QString & | date, |
| bool | strict = true, |
||
| unsigned | centuryMidPoint = QDate::currentDate().year() |
||
| ) |
Definition at line 454 of file alkdateformat.cpp.
References AlkDateFormat::Private::convertStringKMyMoney(), AlkDateFormat::Private::convertStringSkrooge(), d, AlkDateFormat::Private::m_errorCode, AlkDateFormat::Private::m_errorMessage, AlkDateFormat::Private::m_format, and NoError.
Referenced by AlkOnlineQuote::Private::parseDate().
| 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().
| AlkDateFormat::ErrorCode AlkDateFormat::lastError | ( | ) | const |
Definition at line 443 of file alkdateformat.cpp.
References d, and AlkDateFormat::Private::m_errorCode.
| QString AlkDateFormat::lastErrorMessage | ( | ) | const |
Definition at line 448 of file alkdateformat.cpp.
References d, and AlkDateFormat::Private::m_errorMessage.
| AlkDateFormat & AlkDateFormat::operator= | ( | const AlkDateFormat & | right | ) |
Definition at line 431 of file alkdateformat.cpp.
References d, and AlkDateFormat::Private::m_format.
|
private |
Definition at line 68 of file alkdateformat.h.
Referenced by AlkDateFormat(), convertDate(), convertString(), format(), lastError(), lastErrorMessage(), operator=(), and ~AlkDateFormat().