Forum Moderators: open
you might try:
function firstSatNextMonth()
{
var aktdate, ck, i, nextmo, yr;aktdate=new Date();
yr=aktdate.getFullYear();
nextmo=aktdate.getMonth()+1;if(nextmo==12)
{
nextmo=0;
yr+=1;
}for(i=1; i<8; i++)
{
ck=new Date (yr, nextmo, i);
if(ck.getDay()==6) break;
}
return(ck);
}
This will work for local dates. You perhaps will want to use the functions for UTC-Dates.
For these see the description of the Date object in