fix time format

This commit is contained in:
Javier 2016-12-14 15:18:52 -03:00
commit faab393dc0
2 changed files with 12 additions and 0 deletions

View file

@ -25,4 +25,10 @@ angular.module('copayApp.controllers').controller('proposalsController',
});
$scope.openTxpModal = txpModalService.open;
$scope.createdWithinPastDay = function(time) {
var now = new Date();
var date = new Date(time * 1000);
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
};
});

View file

@ -126,6 +126,12 @@ angular.module('copayApp.controllers').controller('tabHomeController',
});
});
$scope.createdWithinPastDay = function(time) {
var now = new Date();
var date = new Date(time * 1000);
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
};
$scope.openExternalLink = function() {
var url = 'https://github.com/bitpay/copay/releases/latest';
var optIn = true;