HTML Tutorial
JavaScripts
Alert
Opening and Closing Windows
Getting and Displaying Text from User
Displaying Date
Moving Through History
Status Bar Clock
Title Bar Clock
Clock
Scrolling Status Bar Message
Typing Status Bar Message
Bouncing Status Bar Message
Title Bar Message Changer
Title Bar Message Typer
Javascript Tutorial

Instructions: Place this script where you want the output to appear on your webpage. The blue text may be re-arranged if you want the date in a different format.

Tested On: IE 6, Mozilla 1.3, Opera 7

<SCRIPT LANGUAGE="JavaScript">
  <!-- Hide this from older browsers
  // This script was written by Protoplasm
  // http://geocities.datacellar.net/protoplasm72

  var Today = new Date();
  var week, month;

  switch (Today.getDay()) {
    case 0:
      week = "Sunday";
      break;
    case 1:
      week = "Monday";
      break;
    case 2:
      week = "Tuesday";
      break;
    case 3:
      week = "Wednesday";
      break;
    case 4:
      week = "Thursday";
      break;
    case 5:
      week = "Friday";
      break;
    case 6:
      week = "Saturday";
      break;
  }

  switch (Today.getMonth()) {
    case 0:
      month = "January";
      break;
    case 1:
      month = "February";
      break;
    case 2:
      month = "March";
      break;
    case 3:
      month = "April";
      break;
    case 4:
      month = "May";
      break;
    case 5:
      month = "June";
      break;
    case 6:
      month = "July";
      break;
    case 7:
      month = "August";
      break;
    case 8:
      month = "September";
      break;
    case 9:
      month = "October";
      break;
    case 10:
      month = "November";
      break;
    case 11:
      month = "December";
      break;
  }

  document.write (week + " " + month + " " + Today.getDate() + ", " + Today.getYear());

  // end hide -->
</SCRIPT>

Written by Protoplasm

1