Fix end budget parsing

pull/33/head
HardiReady 2018-04-15 16:36:47 +02:00
parent db1222d0d5
commit 11c2bf6374
2 changed files with 3 additions and 5 deletions

View File

@ -102,12 +102,10 @@ const parseWarLog = (lineArray, war) => {
// this date needs to be assigned in first place !important // this date needs to be assigned in first place !important
const dateString = budg[0].slice(0, -1).split('/').map((s) => parseInt(s)); const dateString = budg[0].slice(0, -1).split('/').map((s) => parseInt(s));
stats.war.date = new Date(dateString[0], dateString[1] - 1, dateString[2]); stats.war.date = new Date(dateString[0], dateString[1] - 1, dateString[2]);
console.log(war.date);
} else if (line.includes('Endbudget')) { } else if (line.includes('Endbudget')) {
stats.war['endBudgetBlufor'] = transformMoneyString(budg[9].substr(1)); stats.war['endBudgetBlufor'] = transformMoneyString(budg[9]);
stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -1)); stats.war['endBudgetOpfor'] = transformMoneyString(budg[12].slice(0, -2));
stats.war.endDate = getFullTimeDate(war.date, budg[5]); stats.war.endDate = getFullTimeDate(war.date, budg[5]);
console.log(war.endDate);
} else { } else {
stats.budget.push(getBudgetEntry(budg, war._id, war.date)); stats.budget.push(getBudgetEntry(budg, war._id, war.date));
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "opt-cc", "name": "opt-cc",
"version": "1.7.2", "version": "1.7.3",
"author": "Florian Hartwich <hardi@noarch.de>", "author": "Florian Hartwich <hardi@noarch.de>",
"private": true, "private": true,
"scripts": { "scripts": {