Merge pull request #26 from njay/daterange

Change display of project date ranges to be more sensible
This commit is contained in:
Eric R
2011-07-29 12:24:49 -07:00
2 changed files with 9 additions and 4 deletions

View File

@@ -160,7 +160,6 @@ var run = function() {
url: 'views/job.html',
dataType: 'html',
success: function(response) {
var now = new Date().getFullYear();
languages = sortLanguages(languages, maxLanguages);
if (languages && languages.length > 0) {
@@ -193,11 +192,17 @@ var run = function() {
var since = new Date(arr[index].info.created_at);
since = since.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).