chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

電子發(fā)燒友App

硬聲App

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示
創(chuàng)作
電子發(fā)燒友網(wǎng)>電子資料下載>C語言|源代碼>萬年歷算法分析(公歷陰歷農(nóng)歷)

萬年歷算法分析(公歷陰歷農(nóng)歷)

2009-08-21 | rar | 322 | 次下載 | 10積分

資料介紹

萬年歷算法分析:萬年歷算法
一、 陽歷算法
具體算法見函數(shù)Void get_solar_day_date(void),這樣陽歷日歷的星期排法就確定了。
表1:

月份 1 2 3 4 5 6 7 8 9 10 11 12
閏年 31 29 31 30 31 30 31 31 30 31 30 31
非閏年 31 28 31 30 31 30 31 31 30 31 30 31
變量定義:
Public:
Unsigned int temp_total_day;
Unsigned char gc_solar_calendar_year;
Unsigned char gc_solar_calendar_month;
Unsigned char gc_solar_calendar_date;
Unsigned char gc_lunar_calendar_year;
Unsigned char gc_lunar_calendar_month;
Unsigned char gc_lunar_calendar_date;
Unsigned char start_day_of_week;
說明:函數(shù)get_solar_day_date(void)的輸入變量:gc_solar_calendar_year和gc_solar_calendar_month
輸出變量:start_day_of_week和temp_total_day
Void get_solar_day_date(void)
{
unsigned char temp01;
/*------calculate what day is the day of the current month and year. Mon~Sun?---*/
/*條件初始化二次,減少運(yùn)算數(shù)據(jù)量. temp_total_day 是int型變量*/
start_day_of_week = 2; temp_total_day = 0;calculate_temp = 1;
if(gc_solar_calendar_year > 99)
{start_day_of_week = 6;calculate_temp = 100;}
for(temp01 = calculate_temp; temp01{ if(temp01%4 == 0){start_day_of_week +=2;temp_total_day += 366; }
else {start_day_of_week +=1;temp_total_day += 365;}}
for(temp01 = 1;temp01{ switch(temp01)
{case 1,3,5,7,8,10,12: start_day_of_week +=3;temp_total_day +=31;break;
case 2: if(((gc_solar_calendar_year%4) == 0)&&(gc_solar_calendar_year != 200))
{start_day_of_week +=1; temp_total_day +=29;}
else {start_day_of_week +=0;temp_total_day +=28;} break;
case 4,6,9,11: start_day_of_week +=2; temp_total_day +=30; break;}}
start_day_of_week %=7;
/*-end of calculate what day is the day(Mon~Sun?) and total day --*/

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1常用電子元器件集錦
  2. 1.72 MB   |  24485次下載  |  免費(fèi)
  3. 2ssd1306單片 CMOS OLED/PLED 驅(qū)動(dòng)芯片中文手冊
  4. 1.66 MB   |  4次下載  |  1 積分
  5. 3低壓降肖特基整流管SR340L數(shù)據(jù)手冊
  6. 0.78 MB   |  2次下載  |  免費(fèi)
  7. 4高壓MOS管MDD12N65F/MDD12N65P數(shù)據(jù)手冊
  8. 2.36 MB   |  2次下載  |  免費(fèi)
  9. 5FP6195 60V、800mA、480KHz異步降壓轉(zhuǎn)換器規(guī)格書
  10. 0.88 MB   |  2次下載  |  免費(fèi)
  11. 6CPCI6310型復(fù)合視頻采集板資料
  12. 0.04 MB   |  1次下載  |  免費(fèi)
  13. 7STM32F10xxx參考手冊
  14. 13.64 MB   |  1次下載  |  1 積分
  15. 8PC2456高壓浪涌抑制器控制器數(shù)據(jù)手冊
  16. 3.03 MB   |  1次下載  |  免費(fèi)

本月

  1. 1常用電子元器件集錦
  2. 1.72 MB   |  24485次下載  |  免費(fèi)
  3. 2三相逆變主電路的原理圖和PCB資料合集免費(fèi)下載
  4. 27.35 MB   |  111次下載  |  1 積分
  5. 3運(yùn)算放大器基本電路中文資料
  6. 1.30 MB   |  16次下載  |  免費(fèi)
  7. 4蘋果iphone 11電路原理圖
  8. 4.98 MB   |  12次下載  |  5 積分
  9. 5常用電子元器件介紹
  10. 3.21 MB   |  10次下載  |  免費(fèi)
  11. 6EMC電路設(shè)計(jì)工程師必備的EMC基礎(chǔ)
  12. 0.42 MB   |  6次下載  |  2 積分
  13. 7相關(guān)協(xié)議信號總結(jié)
  14. 0.94 MB   |  4次下載  |  免費(fèi)
  15. 8ssd1306單片 CMOS OLED/PLED 驅(qū)動(dòng)芯片中文手冊
  16. 1.66 MB   |  4次下載  |  1 積分

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935130次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計(jì)
  4. 1.48MB  |  420064次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233089次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費(fèi)下載
  8. 340992  |  191390次下載  |  10 積分
  9. 5十天學(xué)會(huì)AVR單片機(jī)與C語言視頻教程 下載
  10. 158M  |  183345次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81591次下載  |  10 積分
  13. 7Keil工具M(jìn)DK-Arm免費(fèi)下載
  14. 0.02 MB  |  73816次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65989次下載  |  10 積分