Skip to content

Instantly share code, notes, and snippets.

@padolsey
Created August 16, 2013 09:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save padolsey/6248490 to your computer and use it in GitHub Desktop.
Save padolsey/6248490 to your computer and use it in GitHub Desktop.
Utilities for Friday
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