From c98fc955ea480f5770e24d7378846e503a345277 Mon Sep 17 00:00:00 2001 From: Jason Harris Date: Sat, 25 Aug 2007 17:34:54 +0000 Subject: [PATCH] Add two common date string formats to ExtDate::fromString(): "Year-month-day", and "month/day/Year" svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=704650 --- extdate/extdatetime.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extdate/extdatetime.cpp b/extdate/extdatetime.cpp index 94fe052..8411a5f 100644 --- a/extdate/extdatetime.cpp +++ b/extdate/extdatetime.cpp @@ -461,6 +461,13 @@ 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; + else return ExtDate(); //invalid } -- 2.47.3