date one-year projects by that year alone - #7

This commit is contained in:
Nick Novitski
2011-06-01 11:11:20 -07:00
parent 0952a0b113
commit d2ca7c22f8
2 changed files with 9 additions and 5 deletions

View File

@@ -190,13 +190,17 @@ var run = function() {
var since = new Date(arr[index].info.created_at);
since = since.getFullYear();
var now = new Date(arr[index].info.pushed_at);
now = now.getFullYear();
var until = new Date(arr[index].info.pushed_at);
until = until.getFullYear();
if (since == until) {
date = since
} else {
date = since + ' - ' + until
}
var view = {
name: arr[index].info.name,
since: since,
now: now,
date:date,
language: arr[index].info.language,
description: arr[index].info.description,
username: username,