installment-calculations
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -12,3 +12,5 @@ var moment = require('moment'), | ||
var results = []; | ||
var currentDate = moment.utc(startDate).startOf('day').format(); | ||
// This is the format the DB expects. | ||
var outputFormat = 'YYYY-MM-DD HH:mm:ss'; | ||
var currentDate = moment.utc(startDate).startOf('day').format(outputFormat); | ||
@@ -28,5 +30,5 @@ for (var ctr = 0; ctr < numberOfInstallments; ctr++) { | ||
if (depositInterval === 'MONTHLY') { | ||
currentDate = moment.utc(startDate).add(ctr+1, 'months').startOf('day').format(); | ||
currentDate = moment.utc(startDate).add(ctr+1, 'months').startOf('day').format(outputFormat); | ||
} else { | ||
currentDate = moment.utc(currentDate).add(7, 'days').startOf('day').format(); | ||
currentDate = moment.utc(currentDate).add(7, 'days').startOf('day').format(outputFormat); | ||
}; | ||
@@ -33,0 +35,0 @@ } |
{ | ||
"name": "installment-calculations", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Calculate payment installments (and other useful details) based on start/end dates, interval and target amount", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16962
300