Skip to content

Commit

Permalink
Fix the date countdown (day was getting parsed incorrectly, and month…
Browse files Browse the repository at this point in the history
… was off by 1)
  • Loading branch information
mjumbewu committed Jun 7, 2011
1 parent 32a3d8b commit d308420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/context/projects.js
Expand Up @@ -110,8 +110,8 @@ exports.metrics = function() {
var dateString = project.deadline; // Assumed to be an ISO 8601 date var dateString = project.deadline; // Assumed to be an ISO 8601 date
var year = dateString.substr(0,4); var year = dateString.substr(0,4);
var month = dateString.substr(5,2); var month = dateString.substr(5,2);
var day = dateString.substr(7,2); var day = dateString.substr(8,2);
var deadline = new Date(year, month, day); var deadline = new Date(year, month-1, day);


// Calclate difference days until. // Calclate difference days until.
var now = new Date(); var now = new Date();
Expand Down

0 comments on commit d308420

Please sign in to comment.