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,

View File

@@ -3,7 +3,7 @@
<a href="http://github.com/{{username}}/{{name}}">{{name}}</a>
</h2>
<h3>{{#language}}{{language}} - {{/language}}Creator &amp; Owner</h3>
<h4>{{since}} - {{now}}</h4>
<h4>{{date}}</h4>
<p>{{description}}.</p>
<p>
This repository has {{watchers}} watcher(s) and {{forks}} fork(s).