WNL.H
上传用户:weike0160
上传日期:2007-05-31
资源大小:5k
文件大小:4k
-
- /*天干,地支,属象,农历月份名,农历日期名,阳历每月的天数*/
- unsigned char TianGanName[][3]={"甲","乙","丙",",丁","戊","已","庚","辛","壬","癸"};
- unsigned char DiZhiName[][3]={"子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};
- unsigned char ShuXingName[][3]={"鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"};
- unsigned char nl_MonthName[][7]={" ",
- "正月","二月","三月","四月","五月","六月","七月","八月","九月",
- "十月","十一月","十二月"};
- unsigned char nl_DayName[][5]={" ",
- "初一","初二","初三","初四","初五","初六","初七","初八","初九","初十",
- "十一","十二","十三","十四","十五","十六","十七","十八","十九","二十",
- "廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"};
- int yl_MonthDays[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
- /******************************************************
- 1900 to 1909年的农历数据
- 日期数据定义方法如下
- 前12个字节代表1-12月为大月或是小月,1为大月30天,0为小月29天,
- 第13位为闰月的情况,1为大月30天,0为小月29天,第14位为闰月的月
- 份,如果不是闰月为0,否则给出月份,10、11、12分别用A、B、C来表
- 示,即使用16进制。最后4位为当年家农历新年-即农历1月1日所在公历
- 的日期,如0131代表1月31日。
- *******************************************************/
- unsigned char daList[][18] ={
- "010010110110180131","010010101110000219","101001010111000208","010100100110150129","110100100110000216",
- "110110010101000204","011010101010140125","010101101010000213","100110101101000202","010010101110120122",
- "010010101110000210","101001001101160130","101001001101000218","110100100101000206","110101010100150126",
- "101101010101000214","010101101010000204","100101101101020123","100101011011000211","010010011011170201",
- "010010011011000220","101001001011000208","101100100101150128","011010100101000216","011011010100000205",
- "101011011010140124","001010110110000213","100101010111000202","010010010111120123","010010010111000210",
- "011001001011060130","110101001010000217","111010100101000206","011011010100150126","010110101101000214",
- "001010110110000204","100100110111030124","100100101110000211","110010010110170131","110010010101000219",
- "110101001010000208","110110100101060127","101101010101000215","010101101010000205","101010101101140125",
- "001001011101000213","100100101101000202","110010010101120122","101010010101000210","101101001010170129",
- "011011001010000217","101101010101000206","010101011010150127","010011011010000214","101001011011000203",
- "010100101011130124","010100101011000212","101010010101080131","111010010101000218","011010101010000208",
- "101011010101060128","101010110101000215","010010110110000205","101001010111040125","101001010111000213",
- "010100100110000202","111010010011030121","110110010101000209","010110101010170130","010101101010000217",
- "100101101101000206","010010101110150127","010010101101000215","101001001101000203","110100100110140123",
- "110100100101000211","110101010010180131","101101010100000218","101101011010000207","100101101101060128",
- "100101011011000216","010010011011000205","101001001011140125","101001001011000213","1011001001011A0202",
- "011010100101000220","011011010100000209","101011011010060129","101010110110000217","100100110111000206",
- "010010010111150127","010010010111000215","011001001011000204","011010100101030123","111010100101000210",
- "011010110010180131","010110101100000219","101010110110000207","100100110110150128","100100101110000216",
- "110010010110000205","110101001010140124","110101001010000212","110110100101000201","010110101010120122",
- "010101101010000209","101010101101170129","001001011101000218","100100101101000207","110010010101150126",
- "101010010101000214","101101001010000214",
- };
-
- typedef struct _tagMyDate
- {
- int iYear;
- int iMonth;
- int iDay;
- int iMonthDayNum; /*本月天数,只有农历本字段才有用*/
- int iMonthIsRun; /*如果所给的日期为润月,则该值为1,否则为0,只有农历本字段才有用*/
- }MYDATE;
-
- void GetOfNongLiDate(MYDATE *nlDate,MYDATE ylDate);
- void printfDay(int iStartWeekDay,MYDATE structYlDate,
- MYDATE structNlDate);
- int GetWeek(MYDATE structYlDate);
- void printfWeekName();
- int GetSepDayNum(MYDATE structYlDate0 ,
- MYDATE structYlDate1 );
- void GetMonthInfo(MYDATE *structMonthInfo,MYDATE preMonthInfo);