Code style

This commit is contained in:
Ionică Bizău 2015-02-18 11:29:01 +02:00
parent f23ac9add0
commit 087a393454
1 changed files with 9 additions and 4 deletions

View File

@ -342,11 +342,16 @@ GitStats.ansiCalendar = function (data, callback) {
// Months label
monthHack = "MMMM"; //Left padding
for (var i=0; i<months.length; i++) {
// The length of strMonths should always be 2*(i+1) (at the i-th column)
if (months[i] === undefined) strMonths += new Array(2*(i+1)-strMonths.length+1).join(" ");
else strMonths += months[i];
for (var i = 0; i < months.length; i++) {
// The length of strMonths should always be 2*(i+1) (at the i-th column)
if (!months[i]) {
strMonths += new Array(2*(i+1)-strMonths.length+1).join(" ");
} else {
strMonths += months[i];
}
}
strYear = monthHack + strMonths + "\n" + strYear;
strYear +=
new Array(5 + 2 * Math.ceil(365 / 7)).join("-")