mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 21:32:10 +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 = []
|
||||
, months = []
|
||||
, cWeek = [" ", " ", " ", " ", " ", " ", " "]
|
||||
, monthHack = "MM"
|
||||
, sDay = ""
|
||||
, cDayObj = null
|
||||
, strYear = ""
|
||||
|
@ -250,8 +251,8 @@ GitStats.ansiCalendar = function (data, callback) {
|
|||
return DAYS[i] + c;
|
||||
}).join("\n");
|
||||
|
||||
var foo = "MMM"
|
||||
strYear = foo + months.join(" ") + "\n" + strYear;
|
||||
monthHack = "MMM"
|
||||
strYear = monthHack + months.join(" ") + "\n" + strYear;
|
||||
strYear +=
|
||||
new Array(5 + 2 * Math.ceil(365 / 7)).join("-")
|
||||
+ "\n" + "Contributions in the last year: " + cal.total
|
||||
|
@ -280,7 +281,7 @@ GitStats.ansiCalendar = function (data, callback) {
|
|||
, hAlign: "left"
|
||||
}).toString();
|
||||
|
||||
strYear = strYear.replace(foo, new Array(foo.length + 1).join(" "));
|
||||
strYear = strYear.replace(monthHack, new Array(monthHack.length + 1).join(" "));
|
||||
|
||||
callback(null, strYear);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue