summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klocale.cpp17
-rw-r--r--microkde/kdecore/klocale.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 17031c7..8b4513e 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -615,8 +615,25 @@ QDateTime KLocale::readDateTime(const QString &intstr,
qDebug("KLocale::readDateTime() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2);
return m_dt;
}
+QDate KLocale::readDate(const QString &intstr,
+ IntDateFormat intIntDateFormat,
+ bool* ok) const
+{
+ bool ok1;
+
+ QString dformat = dateFormat(intIntDateFormat);
+
+ QDate m_date = readDate(intstr, dformat, &ok1);
+
+ if (ok)
+ *ok = ok1;
+
+ //qDebug("KLocale::readDate() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2);
+ return m_date;
+}
+
bool KLocale::use12Clock() const
{
return !mHourF24Format ;;
diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h
index 949301a..5783530 100644
--- a/microkde/kdecore/klocale.h
+++ b/microkde/kdecore/klocale.h
@@ -52,8 +52,10 @@ class KLocale
QDate readDate(const QString &str, bool* ok = 0) const;
QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
QTime readTime(const QString &str, bool* ok = 0) const;
+ QDate readDate(const QString &intstr, IntDateFormat intIntDateFormat, bool* ok) const;
+
QDateTime readDateTime(const QString &intstr, IntDateFormat intIntDateFormat, bool* ok) const;
bool use12Clock() const;
bool weekStartsMonday() const;