Skip to content
Snippets Groups Projects
Commit 695e50bb authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Fix subtract on string error

parent 7e279bb4
Branches
No related tags found
1 merge request!1Dev
......@@ -141,12 +141,14 @@ async function startLoadDataProcess(token, usagePointID) {
await launchLoadDataProcess(token, usagePointID, startLoadDate, endDate)
} else {
log('info', 'launch process with history')
for (var i = 1; i < 5; i++) {
const startDateToIncrement = moment().subtract(7, 'day')
const endDateToIncrement = moment()
for (var i = 0; i < 4; i++) {
await launchLoadDataProcess(
token,
usagePointID,
startLoadDate.subtract(7 * i, 'day'),
endDate.subtract(7 * i, 'day')
startDateToIncrement.subtract(7 * i, 'day').format('YYYY-MM-DD'),
endDateToIncrement.subtract(7 * i, 'day').format('YYYY-MM-DD')
)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment