Take a look at the MomentJS
code I am currently using:
var date = moment($scope.dt);
for (var i = 0; i < parseInt($scope.numPagos); i++) {
$scope.resultados.push({
'numerodecuota' : i + 1,
'fechas' : date.add(1, 'days').format("MM/DD/YYYY"),
'pagos' : Math.round($scope.importeprestamo / $scope.numPagos + interes),
'interes' : Math.round(interes),
'capital' : $scope.importeprestamo / $scope.numPagos,
'fechaunix' : date.add(1, 'days').unix()
});
}// End for loop
Here is the outcome of the above code:
https://i.sstatic.net/Rm85W.png
The dates should be in this format:
- 01/12/2017
- 01/13/2017
- 01/14/2017
- 01/15/2017
And so forth.