diff --git a/lib/index.js b/lib/index.js index 466ec72..b9688da 100644 --- a/lib/index.js +++ b/lib/index.js @@ -276,11 +276,15 @@ GitStats.ansiCalendar = function (data, callback) { , strYear = "" , w = 0 , d = 0 + , dataClone = { + start: data.start ? Moment(data.start.format(DATE_FORMAT), DATE_FORMAT) : null + , end: data.end ? Moment(data.end.format(DATE_FORMAT), DATE_FORMAT) : null + } ; GitStats.calendar(data, function (err, cal) { if (err) { return callback(err); } - GitStats.iterateDays(function (cDay, mDay) { + GitStats.iterateDays(dataClone, function (cDay, mDay) { sDay = mDay.format("ddd"); if (mDay.format("D") === "1") { months.push(mDay.format("MMM"));