Submission Chamber Logo

Date Stamp
The following JavaScript code will display the current date on your web page, formatted with day of the week, date and year.

<script language="javascript"><!--

var day, date, month
today=new Date()
if(today.getDay()==0){ day = "Sun.," }
else if(today.getDay()==1){ day = "Monday," }
else if(today.getDay()==2){day ="Tuesday,"}
else if(today.getDay()==3){day ="Wednesday,"}
else if(today.getDay()==4){day ="Thursday,"}
else if(today.getDay()==5){day ="Friday,"}
else if(today.getDay()==6){day ="Saturday,"}
if(today.getMonth()==0){month="January "}
else if(today.getMonth()==1){month ="February"}
else if(today.getMonth()==2){month ="March"}
else if(today.getMonth()==3){month ="April"}
else if(today.getMonth()==4){month ="May"}
else if(today.getMonth()==5){month ="June"}
else if(today.getMonth()==6){month ="July"}
else if(today.getMonth()==7){month ="August"}
else if(today.getMonth()==8){month ="September"}
else if(today.getMonth()==9){month ="October"}
else if(today.getMonth()==10){month ="November"}
else if(today.getMonth()==11){month ="December"}
if(today.getDate()==1){date ="1st"}
else if(today.getDate()==2){date ="2nd"}
else if(today.getDate()==3){date ="3rd"}
else if(today.getDate()==4){date ="4th"}
else if(today.getDate()==5){date ="5th"}
else if(today.getDate()==6){date ="6th"}
else if(today.getDate()==7){date ="7th"}
else if(today.getDate()==8){date ="8th"}
else if(today.getDate()==9){date ="9th"}
else if(today.getDate()==10){date ="10th"}
else if(today.getDate()==11){date ="11th"}
else if(today.getDate()==12){date ="12th"}
else if(today.getDate()==13){date ="13th"}
else if(today.getDate()==14){date ="14th"}
else if(today.getDate()==15){date ="15th"}
else if(today.getDate()==16){date ="16th"}
else if(today.getDate()==17){date ="17th"}
else if(today.getDate()==18){date ="18th"}
else if(today.getDate()==19){date ="19th"}
else if(today.getDate()==20){date ="20th"}
else if(today.getDate()==21){date ="21st"}
else if(today.getDate()==22){date ="22nd"}
else if(today.getDate()==23){date ="23rd"}
else if(today.getDate()==24){date ="24th"}
else if(today.getDate()==25){date ="25th"}
else if(today.getDate()==26){date ="26th"}
else if(today.getDate()==27){date ="27th"}
else if(today.getDate()==28){date ="28th"}
else if(today.getDate()==29){date ="29th"}
else if(today.getDate()==30){date ="30th"}
else if(today.getDate()==31){date ="31st"}

//-->
</script>

Copy and paste the following coding in your HTML where you want the date to be displayed:

<script language="JavaScript">
<!--
document.write(day + ' ' + month + ' ' + date)
//-->
</script>

On your web page the HTML output will look like:



Return to Help Guides



Copyright © 2001-2006 Submission Chamber.
The Submission Chamber contains adult material and is intended for adults 18 years & over!
Duplication, publication or distribution of this site in part or in whole is strictly prohibited.