全球旧事资料 分类
ddress定义农历地址ui
tday_
umberucharclock_moo
3定义阴历clock_time3指向日dayclock_time410clock_time0x0fBCD转换十进制clock_time指向月mo
thclock_time410clock_time0x0fBCD转换十进制clock_time指向年yearclock_time410clock_time0x0fBCD转换十进制定位日历地址ifc_flag0
cale
dar_addressyear993else
cale
dar_addressyear13春节正月初一所在的阳历月份temp1year_codecale
dar_address20x60Bit6Bit5春节所在的阳历月份temp15春节正月初一所在的阳历日期temp2year_codecale
dar_address20x1fBit4Bit0春节所在的阳历日期计算春节正月初一离当年元旦1月1日阳历的天数;春节只会在阳历的1月或2月
temp3temp21iftemp11temp30x1f计算阳历月离当年元旦1月1日阳历的天数ifmo
th10
day_
umberday_code1mo
th1dayelse
13
f山东工商学院2015单片机实训报告
day_
umberday_code2mo
th10day
如果阳历的月大于2且该年的2月为闰月,天数加1闰年指的就是阳历有闰日或阴历有闰月的一年;
阳历四年一闰,在二月加一天,这一天叫做闰日:
农历三年一闰,五年两闰,十九年七闰,每逢闰年所加的一个月叫做闰月。
ifmo
th2year0x040day_
umber1
day_
umber
ifmo
th2year0x040
day_
umber1
判断阳历日在春节正月初一之前还是之后
ifday_
umbertemp3阳历在春节之后或者春节当日

day_
umbertemp3
mo
th1mo
th_poi
t1mo
th_poi
t为月份指向,阳历日在春季前就是春季flag_mo
thget_moo
_daymo
th_poi
tcale
dar_address检查该阴历月的大小
大月返回1
小月返回0
flag_year0
ifflag_mo
th0temp129elsetemp130
闰月所在的月分
temp2year_codecale
dar_address0xf0temp24提取高四位假如是0表示没有闰月
whileday_
umbertemp1

day_
umbertemp1
mo
th_poi
t
ifmo
thtemp2

flag_yearflag_year
ifflag_year0
mo
th1

else
mo
th
flag_mo
thget_moo
_daymo
th_poi
tcale
dar_address
ifflag_mo
th
temp130
else
temp129

dayday_
umber1
else阳历在春节之前使用以下代码进行运算

14
f山东工商学院2015单片机实训报告
temp3day_
umberifyear0
year0xe3c_flag1else
year1cale
dar_address3mo
th0xctemp2year_codecale
dar_address0xf0temp24提取高4位flag_year0iftemp20
mo
th_poi
t12else
mo
th_poi
t13flag_year0flag_mo
thget_moo
_daymo
th_poi
tcale
dar_ar
好听全球资料 返回顶部