Created
August 16, 2013 09:26
-
-
Save padolsey/6248490 to your computer and use it in GitHub Desktop.
Utilities for Friday
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isItFriday() { | |
return new Date().getDay() === 5 ? | |
'It is!' : | |
'It is not.'; | |
} | |
function whenWillItBeFriday() { | |
var d = 5 - new Date().getDay(); | |
return d === 0 ? | |
'Right now!' : | |
'In ' + (d < 0 ? d + 7 : d) + ' days...'; | |
} | |
function whyIsItNotFriday() { | |
return 'I do not know...'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment