diff options
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 943ad00b6..126792d52 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -959,6 +959,16 @@ const char *get_dive_date_c_string(timestamp_t when) return strdup(text.toUtf8().data()); } +extern "C" const char *get_current_date() +{ + QDateTime ts(QDateTime::currentDateTime());; + QString current_date; + + current_date = loc.toString(ts, QString(prefs.date_format_short)); + + return strdup(current_date.toUtf8().data()); +} + bool is_same_day(timestamp_t trip_when, timestamp_t dive_when) { static timestamp_t twhen = (timestamp_t) 0; |