Skip to content

Commit

Permalink
Default to Christmas instead of No Event
Browse files Browse the repository at this point in the history
  • Loading branch information
confuser committed Jan 6, 2014
1 parent 49587ce commit de0fadd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app.js
Expand Up @@ -41,7 +41,13 @@ app.get('/', function (req, res) {
}
})

if (!nextEvent) nextEvent = { name: 'No Event' }
// Default to Christmas
if (!nextEvent) {
var christmasDate = new Date()
christmasDate.setMonth(11, 25)

nextEvent = { name: 'Christmas', date: christmasDate.toString() }
}

res.render('index', { nextEvent: nextEvent, lastEventDate: lastEventDate.toString() })
})
Expand Down

0 comments on commit de0fadd

Please sign in to comment.