Permalink
Browse files

Default to Christmas instead of No Event

  • Loading branch information...
1 parent 49587ce commit de0fadd1e830f701bef9286038fa8302fd3aced7 @confuser confuser committed Jan 6, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 app.js
View
8 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() })
})

0 comments on commit de0fadd

Please sign in to comment.