timestamp test
parent
1b66ae83a5
commit
93ecfe3094
|
@ -59,15 +59,19 @@ const parseWarLog = (lineArray, war) => {
|
|||
else if (line.includes('Budget')) {
|
||||
stats.clean.push(line);
|
||||
const budg = line.split(' ');
|
||||
if (line.includes('Endbudget')) {
|
||||
stats.war['endBudgetBlufor'] = transformMoneyString(budg[11]);
|
||||
stats.war['endBudgetOpfor'] = transformMoneyString(budg[14]);
|
||||
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
||||
} else if (line.includes('Startbudget')) {
|
||||
if (line.includes('Startbudget')) {
|
||||
stats.war['budgetBlufor'] = transformMoneyString(budg[11]);
|
||||
stats.war['budgetOpfor'] = transformMoneyString(budg[14]);
|
||||
// this date needs to be assigned in first place !important
|
||||
stats.war.date = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-') + 'T22:00:00');
|
||||
stats.war.date = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-'));
|
||||
} else if (line.includes('Endbudget')) {
|
||||
stats.war['endBudgetBlufor'] = transformMoneyString(budg[11]);
|
||||
stats.war['endBudgetOpfor'] = transformMoneyString(budg[14]);
|
||||
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
||||
|
||||
console.log(stats.war.date);
|
||||
console.log(budg[5]);
|
||||
console.log(stats.war.endDate);
|
||||
} else {
|
||||
stats.budget.push(getBudgetEntry(budg, war._id, war.date));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue