Skip to content

Commit

Permalink
🐛 Fix first follower date
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
Androz2091 committed Jul 6, 2021
1 parent f4b3ff7 commit 07a8b7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export async function extractData (files) {
const formatDayDate = (date) => `${date.getDate().toString().padStart(2, '0')}/${(date.getMonth()+1).toString().padStart(2, '0')}/${date.getFullYear()}`;
let followerCount = 0;
extractedData.followersValues = [];
for (let i = new Date(firstFollowerTimestamp); i.getTime() <= Date.now(); i.setDate(i.getDate() + 1)) {
for (let i = new Date(firstFollowerTimestamp * 1000); i.getTime() <= Date.now(); i.setDate(i.getDate() + 1)) {
const followerDayCount = allFollowers.filter((m) => formatDayDate(new Date(m.timestamp * 1000)) === formatDayDate(i)).length;
extractedData.followersLabels.push(formatDayDate(i));
followerCount += followerDayCount;
Expand Down

0 comments on commit 07a8b7f

Please sign in to comment.