Replace deprecated method
See http://momentjs.com/docs/#/manipulating/max/
This commit is contained in:
parent
12d960183c
commit
fcf035d140
File diff suppressed because one or more lines are too long
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue