Replace deprecated method

See http://momentjs.com/docs/#/manipulating/max/
This commit is contained in:
Jack Grigg 2016-09-11 03:11:55 +12:00
parent 12d960183c
commit fcf035d140
4 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -41,7 +41,7 @@ angular.module('insight.blocks').controller('BlocksController',
$scope.humanSince = function(time) {
var m = moment.unix(time).startOf('day');
var b = moment().startOf('day');
return m.max().from(b);
return moment.min(m).from(b);
};

View File

@ -40,7 +40,7 @@ angular.module('insight.system').controller('IndexController',
$scope.humanSince = function(time) {
var m = moment.unix(time);
return m.max().fromNow();
return moment.min(m).fromNow();
};
$scope.index = function() {

View File

@ -19,7 +19,7 @@ angular.module('insight.status').controller('StatusController',
$scope.humanSince = function(time) {
var m = moment.unix(time / 1000);
return m.max().fromNow();
return moment.min(m).fromNow();
};
var _onSyncUpdate = function(sync) {