@@ -115,6 +115,13 @@ void BaseTrackTableModel::setApplyPlayedTrackColor(bool apply) {
115115 s_bApplyPlayedTrackColor = apply;
116116}
117117
118+ const QString BaseTrackTableModel::kDateFormatDefault = QString();
119+ QString BaseTrackTableModel::s_dateFormat = BaseTrackTableModel::kDateFormatDefault ;
120+
121+ void BaseTrackTableModel::setDateFormat (const QString& format) {
122+ s_dateFormat = format;
123+ }
124+
118125BaseTrackTableModel::BaseTrackTableModel (
119126 QObject* parent,
120127 TrackCollectionManager* pTrackCollectionManager,
@@ -689,10 +696,10 @@ QVariant BaseTrackTableModel::roleValue(
689696 if (field == ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED ) {
690697 // Timestamp column in history feature:
691698 // Use localized date/time format without text: "5/20/98 03:40 AM"
692- return mixxx::displayLocalDateTime (dt);
699+ return mixxx::displayLocalDateTime (dt, s_dateFormat );
693700 }
694701 // For Date Added, use just the date: "5/20/98"
695- return dt.date ();
702+ return mixxx::formatDate ( dt.date (), s_dateFormat );
696703 }
697704 case ColumnCache::COLUMN_LIBRARYTABLE_LAST_PLAYED_AT : {
698705 QDateTime lastPlayedAt;
@@ -718,7 +725,7 @@ QVariant BaseTrackTableModel::roleValue(
718725 if (role == Qt::ToolTipRole || role == kDataExportRole ) {
719726 return dt;
720727 }
721- return dt.date ();
728+ return mixxx::formatDate ( dt.date (), s_dateFormat );
722729 }
723730 case ColumnCache::COLUMN_LIBRARYTABLE_BPM : {
724731 mixxx::Bpm bpm;
0 commit comments