summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdecore/klocale.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 4960b9a..7bd8a70 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -331,6 +331,14 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
IntDateFormat intIntDateFormat) const
{
- return QString( "%1 %2")
- .arg( formatDate( pDateTime.date(), shortFormat, intIntDateFormat ) )
+ QString format("%1 %2");
+
+ if ( intIntDateFormat == Default )
+ format = "%1 %2";
+ else if ( intIntDateFormat == Format1 )
+ format = "%1 %2";
+ else if ( intIntDateFormat == ISODate )
+ format = "%1T%2";
+
+ return format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat ))
.arg( formatTime( pDateTime.time(), includeSeconds , intIntDateFormat ) );
}
@@ -338,5 +346,5 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
QString KLocale::formatDateTime(const QDateTime &pDateTime, IntDateFormat intIntDateFormat) const
{
- return formatDateTime(pDateTime, true, intIntDateFormat);
+ return formatDateTime(pDateTime, true, true, intIntDateFormat);
}
@@ -571,4 +579,20 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const
}
+QDateTime KLocale::readDateTime(const QString &intstr,
+ bool shortFormat,
+ bool includeSeconds,
+ IntDateFormat intIntDateFormat,
+ bool* ok) const
+{
+ bool ok1, ok2;
+
+ QDate m_date = readDate(date, &ok1);
+ QTime m_time = KGlobal::locale()->readTime(time, &ok2);
+ if ((ok1 == false) || (ok2 == false))
+ qDebug("Serializer::extractMeta invalid date or time !!!!!!!!!!!!!");
+
+}
+
+
bool KLocale::use12Clock() const
{