From de0fadd1e830f701bef9286038fa8302fd3aced7 Mon Sep 17 00:00:00 2001 From: James Mortemore Date: Mon, 6 Jan 2014 10:58:31 +0000 Subject: [PATCH] Default to Christmas instead of No Event --- app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index d0cb01c..f438c0b 100644 --- a/app.js +++ b/app.js @@ -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() }) })