fix: hacktoberfest start date calc (#5813)

This commit is contained in:
Caleb Cartwright
2020-11-07 13:32:04 -06:00
committed by GitHub
parent 9803471170
commit 71299a8178

View File

@@ -207,8 +207,10 @@ module.exports = class GithubHacktoberfestCombinedStatus extends GithubAuthV4Ser
}
static getCalendarPosition(year) {
const daysToStart =
moment(`${year}-10-01 12:00:00 Z`).diff(moment(), 'days') + 1
const daysToStart = moment(`${year}-10-01 00:00:00 Z`).diff(
moment(),
'days'
)
const isBefore = daysToStart > 0
return { daysToStart, isBefore }
}