/* This function displays the date in
/*For Today it will display Wednesday 1 Jul 2009
function getLocalDate()
{
var now = new Date();
var day = now.getDay();
var date = now.getDate();
var month = now.getMonth();
var year = now.getFullYear();
var DOW=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var MON=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
return DOW[day] + ' ' + date + ' ' + MON[month] + ' ' + year; }
SAMPLE USAGE
< face="Tahoma" size="1" color="#ffffff">
< language="javascript">
document.write(getLocalDate());
< /script >
< /font >
OUPUT
Wednesday 1 Jul 2009
No comments:
Post a Comment