Hi,
I am creating a website & I want to have text saying 'Updated for June 2009". Is it possible to have this date automatically refresh each month?
I know the html to insert today's date (as given to me on this forum!)
<B>
<FONT style="FONT-SIZE:12pt" color="black" face="arial">
<script language="JavaScript">
<!--
var now = new Date();
var days = new Array(
'Sunday','Monday','Tuesday',
'Wednesday','Thursday','Friday','Saturday');
var months = new Array(
'January','February','March','April','May',
'June','July','August','September','October',
'November','December');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;}
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear()));
document.write(today);
//-->
</script>
</FONT>
</B>
Can this be edited to just give a month & year, & if so is it possible to include the text 'Updated for' in this code? Or is there another way?
Any help really appreciated.
Val
I am creating a website & I want to have text saying 'Updated for June 2009". Is it possible to have this date automatically refresh each month?
I know the html to insert today's date (as given to me on this forum!)
<B>
<FONT style="FONT-SIZE:12pt" color="black" face="arial">
<script language="JavaScript">
<!--
var now = new Date();
var days = new Array(
'Sunday','Monday','Tuesday',
'Wednesday','Thursday','Friday','Saturday');
var months = new Array(
'January','February','March','April','May',
'June','July','August','September','October',
'November','December');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;}
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear()));
document.write(today);
//-->
</script>
</FONT>
</B>
Can this be edited to just give a month & year, & if so is it possible to include the text 'Updated for' in this code? Or is there another way?
Any help really appreciated.
Val
Comment