From: Jason Harris Date: Sat, 25 Aug 2007 18:05:53 +0000 (+0000) Subject: Fix ISODate format for ExtDate::fromString() X-Git-Tag: v3.93.0~59 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=7110fa7a632b702a17fa410d6b4144b537102fa9;p=libqmvoc.git Fix ISODate format for ExtDate::fromString() svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=704655 --- 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 ); }