show full date in wallet detail list if the transaction occured more than a day ago

This commit is contained in:
Marty Alcala 2016-11-03 15:50:22 -04:00
commit b0e23b7231
2 changed files with 9 additions and 1 deletions

View file

@ -172,6 +172,12 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
return getMonthYear(date1) === getMonthYear(date2);
}
$scope.createdWithinPastDay = function(tx) {
var now = new Date();
var date = new Date(tx.time * 1000);
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
};
$scope.isDateInCurrentMonth = function(date) {
var now = new Date();
return getMonthYear(now) === getMonthYear(date);