Guest User

Day of Week

a guest
Jun 26th, 2018
226
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // -----JS CODE-----
  2. var date = new Date();
  3. var day = date.getDay();
  4.  
  5. switch( day )
  6. {
  7.     case 0:
  8.         print( "Sunday" );
  9.         break;
  10.     case 1:
  11.         print( "Monday" );
  12.         break;
  13.     case 2:
  14.         print( "Tuesday" );
  15.         break;
  16.     case 3:
  17.         print( "Wednesday" );
  18.         break;
  19.     case 4:
  20.         print( "Thursday" );
  21.         break;
  22.     case 5:
  23.         print( "Friday" );
  24.         break;
  25.     case 6:
  26.         print( "Saturday" );
  27.         break;
  28. }
RAW Paste Data Copied