From 7110fa7a632b702a17fa410d6b4144b537102fa9 Mon Sep 17 00:00:00 2001 From: Jason Harris Date: Sat, 25 Aug 2007 18:05:53 +0000 Subject: [PATCH] Fix ISODate format for ExtDate::fromString() svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=704655 --- extdate/extdatetime.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/extdate/extdatetime.cpp b/extdate/extdatetime.cpp index 8411a5f..50e07f9 100644 --- a/extdate/extdatetime.cpp +++ b/extdate/extdatetime.cpp @@ -462,9 +462,6 @@ ExtDate ExtDate::fromString( const QString& s ) dResult = ExtDate::fromString( s, Qt::ISODate ); if ( dResult.isValid() ) return dResult; - dResult = ExtDate::fromString( s, "%Y-%m-%d" ); - if ( dResult.isValid() ) return dResult; - dResult = ExtDate::fromString( s, "%m/%d/%Y" ); if ( dResult.isValid() ) return dResult; @@ -487,8 +484,8 @@ ExtDate ExtDate::fromString( const QString& s, Qt::DateFormat f ) case Qt::ISODate : { int year( s.mid( 0, 4 ).toInt() ); - int month( s.mid( 4, 2 ).toInt() ); - int day( s.mid( 6, 2 ).toInt() ); + int month( s.mid( 5, 2 ).toInt() ); + int day( s.mid( 8, 2 ).toInt() ); if ( year && month && day ) return ExtDate( year, month, day ); } -- 2.47.3