Here are a few more I use with Dates:
EricCode:
Date.prototype.MonthName =
function(){
var arrMonths = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
return arrMonths[this.getMonth()];
}
Date.prototype.DayName =
function(){
var arrDays = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
return arrDays[this.getDay()];
}
Date.prototype.FirstDayInt =
function(){
this.setDate(1);
return this.getDay();
}
Date.prototype.FirstDayStr =
function(){
var arrDays = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
this.setDate(1);
return arrDays[this.getDay()];
}
