print("Worked: " + (totals.work/60).toFixed(2) +"h\n" );
-
+var totals = {};
for (var h in GitLogParser.shours) {
var hsum = [];
for (var desc in GitLogParser.shours[h]) {
htot += (GitLogParser.shours[h][desc]/60000).toFixed(2)*1;
hsum.push({ desc : desc, tot : (GitLogParser.shours[h][desc]/60000).toFixed(2)*1 })
+ totals[desc] = (typeof(totals[desc]) == 'undefined' ? 0 : totals[desc]) + ((GitLogParser.shours[h][desc]/60000).toFixed(2)*1);
}
hsum.sort(function(a,b) { if (a.tot == b.tot) { return 0; } return a.tot < b.tot ? 1 : -1 });
print("\n\n" + h+': Total (' + htot +')');