Browse Source

changing fn of setDate to addDays for better code readability

pull/2332/head
Rafael Claudio 2 years ago
committed by Thomas
parent
commit
892baac1d5
  1. 6
      apps/api/src/services/data-gathering/data-gathering.processor.ts

6
apps/api/src/services/data-gathering/data-gathering.processor.ts

@ -18,7 +18,8 @@ import {
getMonth, getMonth,
getYear, getYear,
isBefore, isBefore,
parseISO parseISO,
addDays
} from 'date-fns'; } from 'date-fns';
import { DataGatheringService } from './data-gathering.service'; import { DataGatheringService } from './data-gathering.service';
@ -101,8 +102,7 @@ export class DataGatheringProcessor {
}); });
} }
// Count month one up for iteration currentDate = addDays(currentDate, 1);
currentDate.setDate(currentDate.getDate() + 1);
} }
await this.marketDataService.updateMany({ data }); await this.marketDataService.updateMany({ data });

Loading…
Cancel
Save