ADDING THE CURRENT DATE TO A PAGE

 

High Traffic AD spot for rent

Free Ad Quote

Live help

1 204 344 5070

 
Looking for an easy way to add the current date to a page? Look no
further. Here�s a very simple JavaScript that you can use to display the date as 
determined by the user�s browser. The first variable can be changed to
alter the way the month is displayed. In this expample they are shortened to
reduce the amount of space required. You can edit these to display the full month
name if you like. If you use this script, remember you'll have to change the 
year come January 2001...

Here�s the script:

<SCRIPT LANGUAGE="JavaScript">
var monthNames = new Array(
"Jan.","Feb.","March","April","May","June","July","August","Sept.","Oct.","Nov
.","Dec.");
var now = new Date();
document.write(monthNames[now.getMonth()] + " " + now.getDate() + ",
" + 
2000);
</SCRIPT>