Display date in locale format

Add GetLocale(), GetDateFormat() and FormatDate()
This commit is contained in:
2012-03-27 21:12:55 +02:00
parent 57792fba92
commit a3dc4deff1
9 changed files with 49 additions and 13 deletions

View File

@@ -649,3 +649,18 @@ bool KissCount::ChangeDatabase(QString filename)
{
return _db->ChangeDatabase(filename);
}
QLocale* KissCount::GetLocale()
{
return _wxUI->GetLocale();
}
QString KissCount::GetDateFormat()
{
return _wxUI->GetDateFormat();
}
QString KissCount::FormatDate(int day, int month, int year)
{
return QDate(year, month, day).toString(_wxUI->GetDateFormat());
}

View File

@@ -139,6 +139,10 @@ public:
bool ChangeDatabase(QString filename);
QLocale* GetLocale();
QString GetDateFormat();
QString FormatDate(int day, int month, int year);
private:
wxUI* _wxUI;
Database* _db;