【同城商店源码】【林正英 源码】【devops源码】节气源码_节气 起源
1.编写一份我国的节气节气农历
2.ç¨VBå¦ä½åä¸å¹´å?
3.fullcalendar显示当月日历方法
4.求 网页日历代码
编写一份我国的农历
1网上有现成的代码超级多
2代码有jsp的也有C的或java的一般差不多
3基本都是查表计算农历
4因为表的都差不多所以基本都有年代限制,不能无限计算各个年代
5要想写出完美的源码农历计算方法请学习牛顿力学和天体物理学等以通过太阳的黄经位置(阳历)计算月亮的视位置(农历),如果LZ能计算出来那我佩服之至并麻烦楼主将计算方法的起源源码发给我一份(dongbeirenlaguna@.com),我之前已一直求索这个问题
ç¨VBå¦ä½åä¸å¹´å?节气节气同城商店源码
ç»ä½ 个ååçVBæºç .
curTime = MaskEdBox1
'ææå
WeekName(0) = " * "
WeekName(1) = "æææ¥"
WeekName(2) = "ææä¸"
WeekName(3) = "ææäº"
WeekName(4) = "ææä¸"
WeekName(5) = "ææå"
WeekName(6) = "ææäº"
WeekName(7) = "ææå "
'天干å称
TianGan(0) = "ç²"
TianGan(1) = "ä¹"
TianGan(2) = "ä¸"
TianGan(3) = "ä¸"
TianGan(4) = "æ"
TianGan(5) = "å·±"
TianGan(6) = "åº"
TianGan(7) = "è¾"
TianGan(8) = "壬"
TianGan(9) = "ç¸"
'å°æ¯å称
DiZhi(0) = "å"
DiZhi(1) = "ä¸"
DiZhi(2) = "å¯ "
DiZhi(3) = "å¯"
DiZhi(4) = "è¾°"
DiZhi(5) = "å·³"
DiZhi(6) = "å"
DiZhi(7) = "æª"
DiZhi(8) = "ç³"
DiZhi(9) = "é "
DiZhi() = "æ"
DiZhi() = "亥"
'å±ç¸å称
ShuXiang(0) = "é¼ "
ShuXiang(1) = "ç"
ShuXiang(2) = "è"
ShuXiang(3) = "å "
ShuXiang(4) = "é¾"
ShuXiang(5) = "è"
ShuXiang(6) = "马"
ShuXiang(7) = "ç¾"
ShuXiang(8) = "ç´"
ShuXiang(9) = "鸡"
ShuXiang() = "ç"
ShuXiang() = "çª"
'ååæ¥æå
DayName(0) = "*"
DayName(1) = "åä¸"
DayName(2) = "åäº"
DayName(3) = "åä¸"
DayName(4) = "åå"
DayName(5) = "åäº"
DayName(6) = "åå "
DayName(7) = "åä¸"
DayName(8) = "åå «"
DayName(9) = "åä¹"
DayName() = "åå"
DayName() = "åä¸"
DayName() = "åäº"
DayName() = "åä¸"
DayName() = "åå"
DayName() = "åäº"
DayName() = "åå "
DayName() = "åä¸"
DayName() = "åå «"
DayName() = "åä¹"
DayName() = "äºå"
DayName() = "廿ä¸"
DayName() = "廿äº"
DayName() = "廿ä¸"
DayName() = "廿å"
DayName() = "廿äº"
DayName() = "廿å "
DayName() = "廿ä¸"
DayName() = "å»¿å «"
DayName() = "廿ä¹"
DayName() = "ä¸å"
'ååæ份å
MonName(0) = "*"
MonName(1) = "æ£"
MonName(2) = "äº"
MonName(3) = "ä¸"
MonName(4) = "å"
MonName(5) = "äº"
MonName(6) = "å "
MonName(7) = "ä¸"
MonName(8) = "å «"
MonName(9) = "ä¹"
MonName() = "å"
MonName() = "åä¸"
MonName() = "è "
'å ¬åæ¯æåé¢ç天æ°
MonthAdd(0) = 0
MonthAdd(1) =
MonthAdd(2) =
MonthAdd(3) =
MonthAdd(4) =
MonthAdd(5) =
MonthAdd(6) =
MonthAdd(7) =
MonthAdd(8) =
MonthAdd(9) =
MonthAdd() =
MonthAdd() =
'ååæ°æ®
NongliData(0) =
NongliData(1) =
NongliData(2) =
NongliData(3) =
NongliData(4) =
NongliData(5) =
NongliData(6) =
NongliData(7) =
NongliData(8) =
NongliData(9) =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
NongliData() =
'çæå½åå ¬åå¹´ãæãæ¥ ==> GongliStr
curYear = Year(curTime)
curMonth = Month(curTime)
curDay = Day(curTime)
GongliStr = curYear & "å¹´"
If curMonth < Then
GongliStr = GongliStr & "0" & curMonth & "æ"
Else
GongliStr = GongliStr & curMonth & "æ"
End If
If curDay < Then
GongliStr = GongliStr & "0" & curDay & "æ¥"
Else
GongliStr = GongliStr & curDay & "æ¥"
End If
'çæå½åå ¬åææ ==> WeekdayStr
curWeekday = Weekday(curTime)
WeekdayStr = WeekName(curWeekday)
'计ç®å°åå§æ¶é´å¹´2æ8æ¥ç天æ°ï¼-2-8(æ£æåä¸)
TheDate = (curYear - ) * + Int((curYear - ) / 4) + curDay + MonthAdd(curMonth - 1) -
If curYear Mod 4 = 0 And curMonth > 2 Then
TheDate = TheDate + 1
End If
'计ç®åå天干ãå°æ¯ãæãæ¥
isEnd = 0
m = 0
Do
If NongliData(m) < Then
k =
Else
k =
End If
n = k
Do
If n < 0 Then
Exit Do
End If
'è·åNongliData(m)ç第n个äºè¿å¶ä½çå¼
bit = NongliData(m)
For i = 1 To n Step 1
bit = Int(bit / 2)
Next
bit = bit Mod 2
If TheDate <= + bit Then
isEnd = 1
Exit Do
End If
TheDate = TheDate - - bit
n = n - 1
Loop
If isEnd = 1 Then
Exit Do
End If
m = m + 1
Loop
curYear = + m
curMonth = k - n + 1
curDay = TheDate
If k = Then
If curMonth = (Int(NongliData(m) / ) + 1) Then
curMonth = 1 - curMonth
ElseIf curMonth > Int(NongliData(m) / ) + 1 Then
curMonth = curMonth - 1
End If
End If
'çæåå天干ãå°æ¯ãå±ç¸ ==> NongliStr
NongliStr = "åå" & TianGan(((curYear - 4) Mod ) Mod ) & DiZhi(((curYear - 4) Mod ) Mod ) & "å¹´"
NongliStr = NongliStr & "(" & ShuXiang(((curYear - 4) Mod ) Mod ) & ")"
'çæååæãæ¥ ==> NongliDayStr
If curMonth < 1 Then
NongliDayStr = "é°" & MonName(-1 * curMonth)
Else
NongliDayStr = MonName(curMonth)
End If
NongliDayStr = NongliDayStr & "æ"
NongliDayStr = NongliDayStr & DayName(curDay)
Label2 = NongliStr & NongliDayStr
fullcalendar显示当月日历方法
切图网专注于前端开发,包括fullcalendar日历改造,源码最近项目就遇到了,起源林正英 源码项目中日期插件用的节气节气是fullcalendar,需要显示农历、源码阴历、起源节气、节气节气当前是源码第几周、星期几、起源天干地支、节气节气devops源码生肖年等等,源码实现的起源demo效果如下:
由于插件本身不支持使用农历、节日展示所以对fullcalendar进行了修改,resource 源码当你重新安装是需要手动去修改源码,修改内容如下
* 1、在fullcalendar.js之前引入lunar.js
lunar.js是一个计算农历和各种节假日的第三方js,需在fullcalendar前引用。optional源码
* 2、修改fullcalendar.js
正常生成的日历只是包含一个日期,想要显示农历就需要手动修改源码,目前我使用的版本是3.9.0,改动仅有一处。
if (isDayNumberVisible) { html += view.buildGotoAnchorHtml(date, , date.format(D) // inner HTML);//此处可以搜索fc-day-number,在下面添加以下代码var cTerm = lunar(date).term;if(cTerm){ html+=div class=fc-day-cnTerm+cTerm+/div;}var fes = lunar(date).festival();if(fesfes.length0){ html += div class=fc-day-cnTerm + $.trim(fes
.desc)+/div;}if(!cTerm (!fes || fes.length == 0)){ html += div class=fc-day-cnDate+lunar(date).lMonth+月+lunar(date).lDate+/div;}
结语
至此就都改完了,剩下就是样式了,随便你怎么调可以自由发挥。
来源:t = 0;
var dStyle;
document.onmousemove = mEvn;
//显示详细日期资料
function mOvr(v) {
var s,festival;
var sObj=eval('SD'+ v);
var d=sObj.innerHTML-1;
//sYear,sMonth,sDay,week,
//lYear,lMonth,lDay,isLeap,
//cYear,cMonth,cDay
if(sObj.innerHTML!='') {
sObj.style.cursor = 's-resize';
if(cld[d].solarTerms == '' && cld[d].solarFestival == '' && cld[d].lunarFestival == '')
festival = '';
else
festival = '<TABLE WIDTH=% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR="#CCFFCC"><TR><TD>'+
'<FONT COLOR="#" STYLE="font-size:9pt;">'+cld[d].solarTerms + ' ' + cld[d].solarFestival + ' ' + cld[d].lunarFestival+'</FONT></TD>'+
'</TR></TABLE>';
s= '<TABLE WIDTH="" BORDER=0 CELLPADDING="2" CELLSPACING=0 BGCOLOR="#"><TR><TD>' +
'<TABLE WIDTH=% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD ALIGN="right"><FONT COLOR="#ffffff" STYLE="font-size:9pt;">'+
cld[d].sYear+' 年 '+cld[d].sMonth+' 月 '+cld[d].sDay+' 日<br>星期'+cld[d].week+'<br>'+
'<font color="violet">农历'+(cld[d].isLeap?'闰 ':' ')+cld[d].lMonth+' 月 '+cld[d].lDay+' 日</font><br>'+
'<font color="yellow">'+cld[d].cYear+'年 '+cld[d].cMonth+'月 '+cld[d].cDay + '日</font>'+
'</FONT></TD></TR></TABLE>'+ festival +'</TD></TR></TABLE>';
document.all["detail"].innerHTML = s;
if (snow == 0) {
dStyle.left = x+offsetx-(width/2);
dStyle.top = y+offsety;
dStyle.visibility = "visible";
snow = 1;
}
}
}