Display date in locale format
Add GetLocale(), GetDateFormat() and FormatDate()
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user