MooTools插件

当前位置:首页>Mootools>MooTools插件>我写的万年历插件(含天干地支,农历,阳历,节气

我写的万年历插件(含天干地支,农历,阳历,节气

时间:2015-07-07 11:53来源:网络整理 作者:KKWL 点击:
我写的万年历插件(含天干地支,农历,阳历,节气,各种节假日等),基于MooTools 1.4 演示效果图: 插件源代码: (!_id){lunarInfo=sFtv=lFtv=Show(tY,tM,tD); css+='tr'; css+='tr'; css+=(cld[sD].bColor)?'':''; css+='div

我写的万年历插件(含天干地支,农历,阳历,节气,各种节假日等),基于MooTools 1.4

演示效果图:

 

插件源代码:

(!_id){lunarInfo=sFtv=lFtv=Show(tY,tM,tD);
css+='<tr>';
css+='<tr>';
css+=(cld[sD].bColor)?'>':'>';
css+='<div';
css+=(cld[sD].cColor)?'':'';
}
css+='>';
css+='<span>';
css+=(Option[0])?cld[sD].JieRi+' ':''; css+=(Option[1])?' '+cld[sD].Ganzhi:''; css+='</span>';
css+='<span';
css+=(Option[3])?'':'';
css+='><b>'+(sD+1)+'日</b><em>';
(cld[sD].lDay==1){
}}}
}
}
css+='</em></span></div>';
css+='<span></span>';
css+='</td>';
}}
$("PL_rili_box").getElementById("r1").getLast("td").setStyle("border-right","none");
$("PL_rili_tit").getElementById("del").addEvent('click',Press(_t){
core(y,m){
.length=solarDays(y,m); .firstWeek=sDObj.getDay(); (lDObj=lY=lDObj.year; lM=lDObj.month; lD=lDObj.day; lL=lDObj.RnYue; lX=lL?leapDays(lY):monthDays(lY,lM); (n==0){firstLM=lM;}
lDPOS[n++]=i-lD+1;
}
[i].Ganzhi=Ganzhi(lDObj.dayCyl++); ((i+((i+}
[sTerm(y,m*2)-1].JieQi+=solarTerm[m*2]+' ';
(i (i (i (((y==tY && m==tM){lYearDays(y){
leapDays(y){
leapMonth(y){
monthDays(y,m){
getWeek(_day){
Lunar(objDate){
.RnYue=--i;(solarDays(y,m){
Ganzhi(num){
calElement(lYear,lMonth,lDay,RnYue,aColor,bColor,cColor,JieQi,JieRi,Ganzhi){
.RnYue=RnYue; .aColor=aColor; .bColor=bColor; .cColor=cColor; .JieQi=JieQi; .JieRi=JieRi; .Ganzhi=Ganzhi; }
sTerm(y,n){
(y==2006){(n==8 || n==14){offDate=new Date(offDate -86400 * 1000);}
}
return(offDate.getUTCDate());
}
}


调用方法:

option=memo=PL_rili('rili',option,memo,true);



posted @

------分隔线----------------------------