Date & Time

Press the button for the current date and time

Code Example

<script>
 var rightNow = new Date();
  alert(new Date);
  
  //var theDay = rightNow.getDay();
  //alert(theDay)
  
 var dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
 var now = new Date();
 var theDay = now.getDay();
 var nameOfToday = dayNames[theDay]; 
    alert(nameOfToday);
</script>