Removed duplicated days object.

This commit is contained in:
Ionică Bizău 2015-01-27 17:46:56 +02:00
parent c688d6bab5
commit 0809aef044

View file

@ -25,16 +25,7 @@ const STORE_PATH = Ul.USER_DIR + "/.git-stats"
, Couleurs.fg("▣", "#44a340") , Couleurs.fg("▣", "#44a340")
, Couleurs.fg("▣", "#1e6823") , Couleurs.fg("▣", "#1e6823")
] ]
, DAYS = { , DAYS = [
Sun: 0
, Mon: 1
, Tue: 2
, Wed: 3
, Thu: 4
, Fri: 5
, Sat: 6
}
, DAYS_ARR = [
"Sun" "Sun"
, "Mon" , "Mon"
, "Tue" , "Tue"
@ -234,7 +225,7 @@ GitStats.ansiCalendar = function (data, callback) {
if (!cDayObj) return; if (!cDayObj) return;
cWeek[DAYS[sDay]] = SQUARES[cDayObj.level]; cWeek[DAYS.indexOf(sDay)] = SQUARES[cDayObj.level];
}); });
if (cWeek.length) { if (cWeek.length) {
@ -250,7 +241,7 @@ GitStats.ansiCalendar = function (data, callback) {
strYear = strYear.split("\n").map(function (c, i) { strYear = strYear.split("\n").map(function (c, i) {
if (i > 6) { return; } if (i > 6) { return; }
return DAYS_ARR[i] + c; return DAYS[i] + c;
}).join("\n"); }).join("\n");
strYear += strYear +=