function getMonthCount(year,month) //闰年二月为29天
{
var c = MonHead[month-1];
if((month==2) && isPinYear(year))
{
c++;
}
return c;
}
function getDOW(day,month,year) //求某天的星期几
{
var dt = new Date(year,month-1,day).getDay()/7;
return dt;
}
function IDPrevY() //往前翻 Year
{
if(IDTheYear > 999 && IDTheYear <10000)
{
IDTheYear--;
}
else
{
alert("年份超出范围(1000-9999)!");
}
IDSetDay(IDTheYear,IDTheMonth);
}
function IDNextY() //往后翻 Year
{
if(IDTheYear > 999 && IDTheYear <10000)
{
IDTheYear++;
}
else
{
alert("年份超出范围(1000-9999)!");
}
IDSetDay(IDTheYear,IDTheMonth);
}
function IDToday() //Today Button
{
var today;
IDTheYear = new Date().getFullYear();
IDTheMonth = new Date().getMonth() + 1;
today = new Date().getDate();
//IDSetDay(IDTheYear,IDTheMonth);
if(outObject)
{
outObject.value = IDTheYear + "-" + IDTheMonth + "-" + today;
}
closeLayer();
}