diff options
Diffstat (limited to 'kaddressbook/xxport/dateparser.cpp')
-rw-r--r-- | kaddressbook/xxport/dateparser.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kaddressbook/xxport/dateparser.cpp b/kaddressbook/xxport/dateparser.cpp index ed485e0dd..2052407a6 100644 --- a/kaddressbook/xxport/dateparser.cpp +++ b/kaddressbook/xxport/dateparser.cpp @@ -21,11 +21,11 @@ without including the source code for Qt in the source distribution. */ -#include <qdatetime.h> +#include <tqdatetime.h> #include "dateparser.h" -DateParser::DateParser( const QString &pattern ) +DateParser::DateParser( const TQString &pattern ) : mPattern( pattern ) { } @@ -34,7 +34,7 @@ DateParser::~DateParser() { } -QDate DateParser::parse( const QString &dateStr ) const +TQDate DateParser::parse( const TQString &dateStr ) const { int year, month, day; year = month = day = 0; @@ -46,13 +46,13 @@ QDate DateParser::parse( const QString &dateStr ) const year = 1900 + dateStr.mid( currPos, 2 ).toInt(); currPos += 2; } else - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'Y' ) { // YYYY if ( currPos + 3 < dateStr.length() ) { year = dateStr.mid( currPos, 4 ).toInt(); currPos += 4; } else - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'm' ) { // M or MM if ( currPos + 1 < dateStr.length() ) { if ( dateStr[ currPos ].isDigit() ) { @@ -71,13 +71,13 @@ QDate DateParser::parse( const QString &dateStr ) const } } - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'M' ) { // 0M or MM if ( currPos + 1 < dateStr.length() ) { month = dateStr.mid( currPos, 2 ).toInt(); currPos += 2; } else - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'd' ) { // D or DD if ( currPos + 1 < dateStr.length() ) { if ( dateStr[ currPos ].isDigit() ) { @@ -96,17 +96,17 @@ QDate DateParser::parse( const QString &dateStr ) const } } - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'D' ) { // 0D or DD if ( currPos + 1 < dateStr.length() ) { day = dateStr.mid( currPos, 2 ).toInt(); currPos += 2; } else - return QDate(); + return TQDate(); } else { currPos++; } } - return QDate( year, month, day ); + return TQDate( year, month, day ); } |