diff options
Diffstat (limited to 'libkdeedu/extdate/extdatetime.cpp')
-rw-r--r-- | libkdeedu/extdate/extdatetime.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/libkdeedu/extdate/extdatetime.cpp b/libkdeedu/extdate/extdatetime.cpp index 2af13595..d8984eee 100644 --- a/libkdeedu/extdate/extdatetime.cpp +++ b/libkdeedu/extdate/extdatetime.cpp @@ -293,16 +293,16 @@ TQString ExtDate::toString( const TQString& format ) const TQString result( format ); - result.tqreplace( "%Y", TQString().sprintf( "%d", year() ) ); - result.tqreplace( "%y", TQString().sprintf( "%02d", (year() % 100) ) ); - result.tqreplace( "%n", TQString().sprintf( "%d", month() ) ); - result.tqreplace( "%m", TQString().sprintf( "%02d", month() ) ); - result.tqreplace( "%e", TQString().sprintf( "%d", day() ) ); - result.tqreplace( "%d", TQString().sprintf( "%02d", day() ) ); - result.tqreplace( "%b", shortMonthName( month() ) ); - result.tqreplace( "%B", longMonthName( month() ) ); - result.tqreplace( "%a", shortDayName( dayOfWeek() ) ); - result.tqreplace( "%A", longDayName( dayOfWeek() ) ); + result.replace( "%Y", TQString().sprintf( "%d", year() ) ); + result.replace( "%y", TQString().sprintf( "%02d", (year() % 100) ) ); + result.replace( "%n", TQString().sprintf( "%d", month() ) ); + result.replace( "%m", TQString().sprintf( "%02d", month() ) ); + result.replace( "%e", TQString().sprintf( "%d", day() ) ); + result.replace( "%d", TQString().sprintf( "%02d", day() ) ); + result.replace( "%b", shortMonthName( month() ) ); + result.replace( "%B", longMonthName( month() ) ); + result.replace( "%a", shortDayName( dayOfWeek() ) ); + result.replace( "%A", longDayName( dayOfWeek() ) ); return result; } @@ -833,13 +833,13 @@ TQString ExtDateTime::toString( const TQString& format ) const int h = time().hour(); - result.tqreplace( "%H", TQString().sprintf( "%02d", h ) ); - result.tqreplace( "%k", TQString().sprintf( "%d", h ) ); - result.tqreplace( "%I", TQString().sprintf( "%02d", ( h > 12 ) ? h-12 : h ) ); - result.tqreplace( "%l", TQString().sprintf( "%d", ( h > 12 ) ? h-12 : h ) ); - result.tqreplace( "%M", TQString().sprintf( "%02d", time().minute() ) ); - result.tqreplace( "%S", TQString().sprintf( "%02d", time().second() ) ); - result.tqreplace( "%p", TQString().sprintf( "%s", ( h > 12 ) ? "pm" : "am" ) ); + result.replace( "%H", TQString().sprintf( "%02d", h ) ); + result.replace( "%k", TQString().sprintf( "%d", h ) ); + result.replace( "%I", TQString().sprintf( "%02d", ( h > 12 ) ? h-12 : h ) ); + result.replace( "%l", TQString().sprintf( "%d", ( h > 12 ) ? h-12 : h ) ); + result.replace( "%M", TQString().sprintf( "%02d", time().minute() ) ); + result.replace( "%S", TQString().sprintf( "%02d", time().second() ) ); + result.replace( "%p", TQString().sprintf( "%s", ( h > 12 ) ? "pm" : "am" ) ); return result; } @@ -1084,7 +1084,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) } if ( f == Qt::ISODate ) { - if ( s.length() <= 10 || ! s.tqcontains( ':' ) ) { //no time specified + if ( s.length() <= 10 || ! s.contains( ':' ) ) { //no time specified TQTime t = TQTime(0,0,0); return ExtDateTime( ExtDate::fromString( s.mid(0,10), Qt::ISODate ) ); } else { @@ -1099,7 +1099,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) TQTime time; TQString sd = s; int hour, minute, second; - int pivot = s.tqfind( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); + int pivot = s.find( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); if ( pivot != -1 ) { hour = s.mid( pivot, 2 ).toInt(); minute = s.mid( pivot+3, 2 ).toInt(); |