Merge pull request #91 from phlacin/automaticDating-livepair
Added Moment.js library and time logic to next Live session
This commit is contained in:
3046
public/js/lib/moment/moment.js
Normal file
3046
public/js/lib/moment/moment.js
Normal file
File diff suppressed because it is too large
Load Diff
16
public/js/lib/moment/nextTuesday.js
Normal file
16
public/js/lib/moment/nextTuesday.js
Normal file
@@ -0,0 +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;
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user