added automatic time logic to live-pair-programming page

This commit is contained in:
phlacin
2015-02-12 20:31:11 -08:00
parent 6455d80a6e
commit 2d447f0bb0
4 changed files with 3065 additions and 1 deletions

View File

@@ -1,3 +1,16 @@
/**
* Created by jason on 2/11/15.
*/
function nextSession () {
var next = 'Our next session will be ';
var today = moment().day(moment().day());
if (today > moment().day(2)) {
next += moment().day(9).format('dddd, MMMM Do YYYY') + ' at 9PM EST!';
} else {
next += moment().day('Tuesday').format('dddd, MMMM Do YYYY') + ' at 9PM EST!';
}
return next;
}