#3428 Text string creation based on date and time : Add helper function

This commit is contained in:
Magne Sjaastad
2018-10-01 10:19:59 +02:00
parent bd79bd89c1
commit a083e70ea1
3 changed files with 49 additions and 2 deletions

View File

@@ -101,6 +101,10 @@ public:
static std::vector<DateTimePeriod> dateTimePeriods();
static QString dateTimePeriodName(DateTimePeriod period);
// This function uses C locale to make sure the text representation of a date is stable, independent of the locale
// settings on local machine. Required for stable regression testing.
static QString toStringUsingApplicationLocale(const QDateTime& dt, const QString& format);
private:
static quint64 secondsInDay();
static quint64 secondsInYear();