Display the weekday, month, day and year on your web page

Use the code below to custom format a the weekday, full text month, day and year.
HTML • JavaScript


<html>

<head>
<SCRIPT LANGUAGE=JavaScript>
<!--
	dayName = new Array("Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
	monName = new Array("January","February","March","April","May", "June","July","August","September","October","November","December")
	now = new Date
//-->
</SCRIPT>
</head>

<body>
	<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
	<!-- Hide script from old browsers

	document.write(dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate() + ", " + now.getYear())

	// End hiding script from old browsers -->
	</script>
</body>

</html>

Posted by fbrefere001 on Tuesday February 11, 2003