for(i in lFtv)
if(lFtv[i].match(/^(\d{2})(.{2})([\s*])(.+)/)) {
tmp1=Number(RegExp.1)-firstLM;
if(tmp1==-11) tmp1=1;
if(tmp1 >=0 && tmp1<n) {
tmp2 = lDPOS[tmp1] + Number(RegExp.2) -1;
if( tmp2 >= 0 && tmp2<this.length && this[tmp2].isLeap!=true) {
this[tmp2].lunarFestival += RegExp.4;
//if(RegExp.$3==’*’) this[tmp2].color = ‘red’;
}
}
}
//复活节只出现在 3 或 4 月
if(m==2 || m==3) {
var estDay = new easter(y);
if(m == estDay.m)
this[estDay.d-1].solarFestival3 = this[estDay.d-1].solarFestival3+’复活节
‘;// Easter Sunday’;
}
}
//======================================= 传回该年的复活节(春分后
第一次满月周后的第一主日)
function easter(y) {
var term2=sTerm(y,5); //取得春分日期
var dayTerm2 = new Date(Date.UTC(y,2,term2,0,0,0,0)); //取得春分的国历日期
物件(春分一定出现在 3 月)
var lDayTerm2 = new Lunar(dayTerm2); //取得取得春分农历
if(lDayTerm2.day<15) //取得下个月圆的相差天数
var lMlen= 15-lDayTerm2.day;
else
var lMlen= (lDayTerm2.isLeap? leapDays(y):
monthDays(y,lDayTerm2.month)) - lDayTerm2.day + 15;
//一天等于 1000*60*60*24 = 86400000 毫秒
var l15 = new Date(dayTerm2.getTime() + 86400000*lMlen ); //求出第一次月圆
为国历几日
var dayEaster = new Date(l15.getTime() + 86400000*( 7-l15.getUTCDay() ) ); //
求出下个周日
this.m = dayEaster.getUTCMonth();
精通 CSS+DIV 网页样式与布局 168
最新推荐文章于 2016-12-29 16:48:57 发布