X-Git-Url: http://git.maemo.org/git/?p=weightgraph;a=blobdiff_plain;f=weightgraph%2Fweightstatsview.cpp;h=0ab0362617a72a86a21692c32c2381658594d354;hp=65e4f0f73056b12961796f817d03252eee011776;hb=e13ccfc0b642e8d04d77e32354b0083f8ad26897;hpb=6462accd1f83cfce2ab970eca35ad2f115ee9000 diff --git a/weightgraph/weightstatsview.cpp b/weightgraph/weightstatsview.cpp index 65e4f0f..0ab0362 100644 --- a/weightgraph/weightstatsview.cpp +++ b/weightgraph/weightstatsview.cpp @@ -28,6 +28,8 @@ WeightStatsView::WeightStatsView(WeightDataModel *wdm, QWidget *parent) : updateStats(); } +static const char* wdays[] = {"Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday", "Sunday"}; QString dateString(QDate date) { int days = date.daysTo(QDate::currentDate()); @@ -38,7 +40,9 @@ QString dateString(QDate date) else if (days == 1) return "Yesterday"; else if (days < 7) - return date.toString("dddd"); + // return date.toString("dddd"); (Use this with l10n!) + // The following is used because the system locale might not be English + return wdays[date.dayOfWeek()-1]; else return date.toString(Qt::ISODate); }