mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 13:22:11 +01:00
Code style
This commit is contained in:
parent
f23ac9add0
commit
087a393454
1 changed files with 9 additions and 4 deletions
13
lib/index.js
13
lib/index.js
|
@ -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("-")
|
||||
|
|
Loading…
Reference in a new issue