Skip to content

Instantly share code, notes, and snippets.

@trevor-atlas
Created October 17, 2014 20:14
Show Gist options
  • Save trevor-atlas/09145478cceb8372805c to your computer and use it in GitHub Desktop.
Save trevor-atlas/09145478cceb8372805c to your computer and use it in GitHub Desktop.
Date switch
switch (new Date().getDay()) {
case 0:
day = "Sunday";
break;
case 1:
day = "Monday";
break;
case 2:
day = "Tuesday";
break;
case 3:
day = "Wednesday";
break;
case 4:
day = "Thursday";
break;
case 5:
day = "Friday";
break;
case 6:
day = "Saturday";
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment