mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Some more propper date localization fixes
This commit is contained in:
parent
6ce0b03295
commit
5ed6e7602c
@ -1371,15 +1371,15 @@ void GUI::statistics()
|
|||||||
+ l.toString(_areaCount) + "</td></tr>");
|
+ l.toString(_areaCount) + "</td></tr>");
|
||||||
|
|
||||||
if (_dateRange.first.isValid()) {
|
if (_dateRange.first.isValid()) {
|
||||||
if (_dateRange.first == _dateRange.second) {
|
if (_dateRange.first == _dateRange.second)
|
||||||
text.append("<tr><td>" + tr("Date") + ":</td><td>"
|
text.append("<tr><td>" + tr("Date") + ":</td><td>"
|
||||||
+ l.toString(_dateRange.first, QLocale::ShortFormat) + "</td></tr>");
|
+ l.toString(_dateRange.first, QLocale::ShortFormat)
|
||||||
} else {
|
+ "</td></tr>");
|
||||||
|
else
|
||||||
text.append("<tr><td>" + tr("Date") + ":</td><td>"
|
text.append("<tr><td>" + tr("Date") + ":</td><td>"
|
||||||
+ QString("%1 - %2").arg(l.toString(_dateRange.first,
|
+ QString("%1 - %2").arg(l.toString(_dateRange.first,
|
||||||
QLocale::NarrowFormat), l.toString(_dateRange.second,
|
QLocale::NarrowFormat), l.toString(_dateRange.second,
|
||||||
QLocale::NarrowFormat)) + "</td></tr>");
|
QLocale::NarrowFormat)) + "</td></tr>");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distance() > 0)
|
if (distance() > 0)
|
||||||
@ -1439,14 +1439,12 @@ void GUI::plotMainPage(QPainter *painter, const QRectF &rect, qreal ratio,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_dateRange.first.isValid() && _options.printDate) {
|
if (_dateRange.first.isValid() && _options.printDate) {
|
||||||
if (_dateRange.first == _dateRange.second) {
|
if (_dateRange.first == _dateRange.second)
|
||||||
QString format = l.dateFormat(QLocale::LongFormat);
|
info.insert(tr("Date"), l.toString(_dateRange.first.date()));
|
||||||
info.insert(tr("Date"), _dateRange.first.toString(format));
|
else {
|
||||||
} else {
|
|
||||||
QString format = l.dateFormat(QLocale::ShortFormat);
|
|
||||||
info.insert(tr("Date"), QString("%1 - %2")
|
info.insert(tr("Date"), QString("%1 - %2")
|
||||||
.arg(_dateRange.first.toString(format),
|
.arg(l.toString(_dateRange.first.date(), QLocale::ShortFormat),
|
||||||
_dateRange.second.toString(format)));
|
l.toString(_dateRange.second.date(), QLocale::ShortFormat)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user