//取得兩個日期之間的所有年月
//o_DateTimeA:任一日期
//o_DateTimeB:任一日期
//eg:GetCircleDateHESAPPHL(new Date(2007, 10, 11),new Date(2008, 11, 11)) ;
//return: 200710;200711;200712;200801;200802;200803;200804;200805;200806;200807;200808;200809;200810;
function GetCircleDateHESAPPHL(o_DateTimeA,o_DateTimeB)
{
var yearA = o_DateTimeA.getFullYear() ;
var MonthA = o_DateTimeA.getMonth() ;
var yearB = o_DateTimeB.getFullYear() ;
var MonthB = o_DateTimeB.getMonth() ;
var s_DateHESAPPHL="";
if (o_DateTimeA>o_DateTimeB)
{
var i_YearNow = yearB;
var i_MontNow = MonthB;
for (var iCout = 0; iCout < (yearA - yearB) * 12 + (MonthA - MonthB); iCout++)
{
if(i_MontNow<10)
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow +"0"+ i_MontNow + ";";
else
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow + i_MontNow + ";";
i_MontNow++;
if (i_MontNow > 12)
{
i_MontNow = 1;
i_YearNow++;
}
}
}
else
{
var i_YearNow = yearA;
var i_MontNow = MonthA;
for (var iCout = 0; iCout < (yearB - yearA) * 12 + (MonthB - MonthA); iCout++)
{
if(i_MontNow<10)
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow +"0"+ i_MontNow + ";";
else
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow + i_MontNow + ";";
i_MontNow++;
if (i_MontNow > 12)
{
i_MontNow = 1;
i_YearNow++;
}
}
}
return s_DateHESAPPHL;
}
//o_DateTimeA:任一日期
//o_DateTimeB:任一日期
//eg:GetCircleDateHESAPPHL(new Date(2007, 10, 11),new Date(2008, 11, 11)) ;
//return: 200710;200711;200712;200801;200802;200803;200804;200805;200806;200807;200808;200809;200810;
function GetCircleDateHESAPPHL(o_DateTimeA,o_DateTimeB)
{
var yearA = o_DateTimeA.getFullYear() ;
var MonthA = o_DateTimeA.getMonth() ;
var yearB = o_DateTimeB.getFullYear() ;
var MonthB = o_DateTimeB.getMonth() ;
var s_DateHESAPPHL="";
if (o_DateTimeA>o_DateTimeB)
{
var i_YearNow = yearB;
var i_MontNow = MonthB;
for (var iCout = 0; iCout < (yearA - yearB) * 12 + (MonthA - MonthB); iCout++)
{
if(i_MontNow<10)
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow +"0"+ i_MontNow + ";";
else
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow + i_MontNow + ";";
i_MontNow++;
if (i_MontNow > 12)
{
i_MontNow = 1;
i_YearNow++;
}
}
}
else
{
var i_YearNow = yearA;
var i_MontNow = MonthA;
for (var iCout = 0; iCout < (yearB - yearA) * 12 + (MonthB - MonthA); iCout++)
{
if(i_MontNow<10)
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow +"0"+ i_MontNow + ";";
else
s_DateHESAPPHL = s_DateHESAPPHL + i_YearNow + i_MontNow + ";";
i_MontNow++;
if (i_MontNow > 12)
{
i_MontNow = 1;
i_YearNow++;
}
}
}
return s_DateHESAPPHL;
}