diff --git a/public/js/controllers/groupsCtrl.js b/public/js/controllers/groupsCtrl.js index 376c25d810..e43742bbde 100644 --- a/public/js/controllers/groupsCtrl.js +++ b/public/js/controllers/groupsCtrl.js @@ -111,7 +111,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', ' .controller("MemberModalCtrl", ['$scope', '$rootScope', 'Members', 'Shared', '$http', 'Notification', 'Groups', function($scope, $rootScope, Members, Shared, $http, Notification, Groups) { $scope.timestamp = function(timestamp){ - return moment(timestamp).format('MM/DD/YYYY'); + return moment(timestamp).format(User.user.preferences.dateFormat.toUpperCase()); } // We watch Members.selectedMember because it's asynchronously set, so would be a hassle to handle updates here $scope.$watch( function() { return Members.selectedMember; }, function (member) { diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index 9360daf469..d708545679 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -166,7 +166,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ } matrix = [['Date', 'Score']]; _.each(history, function(obj) { - matrix.push([moment(obj.date).format('MM/DD/YY'), obj.value]); + matrix.push([moment(obj.date).format(User.user.preferences.dateFormat.toUpperCase()), obj.value]); }); data = google.visualization.arrayToDataTable(matrix); options = {