@rgrneJan 27.2008 — #You can assign the Javascript Date object to a variable, for example
var currentdate = new Date();
Then you have to get the current month and year out of it like this:
thismonth = currentdate.getmonth();
(getmonth gives you the month as a number from 0 to 11).
thisyear = currentdate.getFullYear();
(getFullYear gives you the year as a four digit number).
To get the full name of the month I think you have to write a little lookup table in an array or something to make a variable writtenmonth = "January" if thismonth=0, etc. I don't think there is an built in function that provides the month as a name.
In the end you just print out the variables and put a slash between them.
@JMRKERJan 27.2008 — #May also need to add a little bit more logic if you are trying to display the month before January as it will be December of the PREVIOUS year.
Fairly easy test to check as Jan is month 0 and (Jan-1) will be -1 for test
Date.prototype.getLastMonth= function(){ var m= new Date(this.setMonth(this.getMonth()-1)); return Date.monthnames[m.getMonth()].substring(0,3)+'/'+m.getFullYear(); }[/CODE]