🐛Fix analytics dashboard date oboe

This commit is contained in:
Matt Lott 2015-11-11 11:27:01 -08:00
parent 29892a9619
commit 5ca68ff682

View file

@ -4,7 +4,7 @@ module.exports.createContiguousDays = (timeframeDays, skipToday=true) ->
# Return list of last 'timeframeDays' contiguous days in yyyy-mm-dd format
days = []
currentDate = new Date()
currentDate.setUTCDate(currentDate.getUTCDate() - timeframeDays)
currentDate.setUTCDate(currentDate.getUTCDate() - timeframeDays + 1)
currentDate.setUTCDate(currentDate.getUTCDate() - 1) if skipToday
for i in [0...timeframeDays]
currentDay = currentDate.toISOString().substr(0, 10)