mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 13:22:11 +01:00
Arrange months
This commit is contained in:
parent
ec7a66ceda
commit
46b038394c
1 changed files with 4 additions and 3 deletions
|
@ -205,6 +205,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
||||||
var year = []
|
var year = []
|
||||||
, months = []
|
, months = []
|
||||||
, cWeek = [" ", " ", " ", " ", " ", " ", " "]
|
, cWeek = [" ", " ", " ", " ", " ", " ", " "]
|
||||||
|
, monthHack = "MM"
|
||||||
, sDay = ""
|
, sDay = ""
|
||||||
, cDayObj = null
|
, cDayObj = null
|
||||||
, strYear = ""
|
, strYear = ""
|
||||||
|
@ -250,8 +251,8 @@ GitStats.ansiCalendar = function (data, callback) {
|
||||||
return DAYS[i] + c;
|
return DAYS[i] + c;
|
||||||
}).join("\n");
|
}).join("\n");
|
||||||
|
|
||||||
var foo = "MMM"
|
monthHack = "MMM"
|
||||||
strYear = foo + months.join(" ") + "\n" + strYear;
|
strYear = monthHack + months.join(" ") + "\n" + strYear;
|
||||||
strYear +=
|
strYear +=
|
||||||
new Array(5 + 2 * Math.ceil(365 / 7)).join("-")
|
new Array(5 + 2 * Math.ceil(365 / 7)).join("-")
|
||||||
+ "\n" + "Contributions in the last year: " + cal.total
|
+ "\n" + "Contributions in the last year: " + cal.total
|
||||||
|
@ -280,7 +281,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
||||||
, hAlign: "left"
|
, hAlign: "left"
|
||||||
}).toString();
|
}).toString();
|
||||||
|
|
||||||
strYear = strYear.replace(foo, new Array(foo.length + 1).join(" "));
|
strYear = strYear.replace(monthHack, new Array(monthHack.length + 1).join(" "));
|
||||||
|
|
||||||
callback(null, strYear);
|
callback(null, strYear);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue