diff options
Diffstat (limited to 'core/string-format.cpp')
-rw-r--r-- | core/string-format.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/string-format.cpp b/core/string-format.cpp index 9de145b7a..5652a15bf 100644 --- a/core/string-format.cpp +++ b/core/string-format.cpp @@ -250,3 +250,10 @@ QString formatDiveTime(const dive *d) QDateTime localTime = timestampToDateTime(d->when); return localTime.time().toString(prefs.time_format); } + +QString formatDiveDateTime(const dive *d) +{ + QDateTime localTime = timestampToDateTime(d->when); + return QStringLiteral("%1 %2").arg(localTime.date().toString(prefs.date_format_short), + localTime.time().toString(prefs.time_format)); +} |