阳历转阴历算法概述qintangtao

下面描述的是阳历换算阴历的算法原理。

阳历,有很强的规律性。每年12个月,1、3、5、7、8、10、12月都为31天;2月份平年28天,能被4除尽的年份里为29天,但1900年为28天;其余月份为31天。

阴历,却没有这些规律可循。阴历分大小月,大月30天,小月29天,但一年中哪个月为大月,哪个月为小月,却是不定的。阴历每十年有4个润年,但哪一年为润年也是不定的。而润月中,哪个润月为大月,哪个为小月也是不定的。因此,推算阴历就没有一个统一的算法。

阴历是要靠天文观测的,因此上面这些不确定的数据,是可以从天文台得到的。

下面是经过整理的150年内的阴历数据:

上面共15行,每行10个数据。每个数据代表一年,从阳历1900.1.31日起,为第一个数据年的开始,即阳历1900.1.31=阴历0.1.1。150个数据可推150年的阴历,因此目前最大只能推算到2049年,以后的推导,还需要从天文台得到新的数据后才能推导,否则将出现误差。

要推算阴历,关键是理解这些数据的意义。

拿第一个数据来说,代表阳历1900.1.31为始的阴历0年,0x04bd8是5个16进制数,共20bit。

由此可以看出,阴历的规律性是很差的。要推算阴历,必需基于查表的算法,具体的数据结构安排,可以根据不同的语言作灵活的安排。

THE END
1.TVReviews:NPRPop Culture Happy Hour The 'Bad Sisters' are back, and they're better than ever December 18, 2024 ?We first met the Garvey sisters two years ago when the Apple TV+ seriesBad Sistersmade its debut. The show follows four sisters in Ireland who are hell bent on murdering the husband https://www.npr.org/sections/tvreviews/archive
2.CurrentlocaltimeinWuchiTown,ChinaStandard Time Zone: GMT/UTC + 08:00 hour Daylight Saving Time: DST not applied See other cities of China View travel resources for China DST - Daylight Saving Time (Summer Time) GMT - Greenwich Mean Time UTC - Coordinated Universal Time Worldhttps://www.worldtimezone.com/time/wtzresult.php?CiID=3595
3.TheOfficialWebsiteOfZhongShanChina中山市人民政府门户网站--孙中山故乡欢迎您http://www.zs.gov.cn/ywb/features/xiangshanculture/
4.Heshan当前本地时间&日期时区和时差中国(RizhaoShiHeshan Heshan,中国Rizhao Shi, Shandong 时间? 当前本地时间在Heshan中国 Wed, 18. Dec 2024 03:21:22 HTML 现在在 Heshan 是星期几? 星期三(2024年12月18日) China Standard TimeCST 时区 Asia/ Shanghai 协调世界时GMT/UTC UTC+8 夏令时 当前时区未来不适用无夏令时https://www.zeitverschiebung.net/cn/city/12358444
5.CA8266FlightStatusAirChina:ChengdutoWuhan(CCA8266)The average flight time from Chengdu to Wuhan is 1 hour and 19 minutes. The flight distance is 981 km / 610 miles and the average flight speed is 746 km/h / 463 mph. How many CA8266 flights are operated per week? 7 flights per week. The flight CA8266 is operated on Monday, Tuesdahttps://www.airportia.com/flights/ca8266/chengdu/wuhan/
6.“ChinaTravel”再升级!240小时“遇见河北”~河北网络广播电视台,河北广播电视台https://www.hebtv.com/19/19js/dsp/11726672.shtml
7.TimelessTraditions:“Guofeng”MusicWe bring you the final installment of this special series, in which we zero in on the growing trend of “guofeng music”. This is where contemporary tunes are being integrated into traditional Chinese music. On the show: Heyang, Xingyu and Josh Cotterill http://ezfm.cri.cn/columnList/1/435011
8.Chinesia国际中文教育平台全球上线,全球中文学习又掀热潮!教学发布会上深圳市章鱼时代科技发展有限公司面向全球正式发布了其自主研发的国际中文教育平台--Chinesia。秉承着“以技术为先导,以学习者为中心”的教研理念,Chinesia国际中文教育平台是基于当前最前沿的互联网和人工智能技术打造的一个能够帮着学习者打破学习的时空限制既包括自学课程又提供真人直播教学服务综合性多元化国际https://shenzhen.news.163.com/24/1217/09/JJJPMHQL041799BK.html
9.ChineseCharactersChinesePeople:HengChinese Characters Chinese People: Xiao 12-18 | 齐鲁电视台 6.2W Su Xiaomei on Chinese Characters:Heng 12-08 | 齐鲁电视台 16.4W Su Xiaomei on Chinese Characters:Gong 11-02 | 齐鲁电视台 13.9W Su Xiaomei on Chinese Characters:Kuan 10-31 | 齐鲁电视台 15.5W Su Xiaomei https://sdxw.iqilu.com/share/YS0yMS0xNjExMjkzNA==.html
10.HarmonyAcrossEras:QiuZhicheng'sjourneyunder'oneThrough her music, we can explore the deep heritage and modern vitality of traditional Chinese culture, seeking those heartfelt connections that resonate with us. Join us for more inspiring stories at 8:00 PM on December 30th.Photo Ten photos from across China: Dec 13 - 19 Highlights of http://www.chinadaily.com.cn/a/202412/20/WS6764bbf1a310f1265a1d3f15.html
11.ChineseHourCicoDicson高音质在线试听外部播放此歌曲> Cico Dicson - Chinese Hour 专辑:Ongoing Imprisonment 歌手:Cico Dicson 还没有歌词哦https://www.kugou.com/mixsong/8bfhm300.html
12.课后辅导市场规模报告2024简乐尚博简乐尚博(168report)ChineseHour EF Education First Ltd. Hong Kong Tutor Association 本文重点关注全球主要地区和国家,重点包括: 北美市场(美国、加拿大和墨西哥) 欧洲市场(德国、法国、英国、俄罗斯、意大利和欧洲其他国家) 亚太市场(中国、日本、韩国、印度、东南亚和澳大利亚等) https://www.shangyexinzhi.com/article/23648154.html
13.JavaDate.getMinutes方法代码示例示例5: GetChineseHour ▲点赞 2▼ importjava.util.Date;//导入方法依赖的package包/类publicStringGetChineseHour(Date dt, Date _date){int_hour, offset, i;int_minute =0;intindexGan; String ganHour, zhiHour; String tmpGan;//计算时辰的地支_hour = dt.getHours();//获得当前时间小时_minute =https://vimsky.com/zh-tw/examples/detail/java-method-java.util.Date.getMinutes.html
14.BadContent24-hour-fitness-online.com 269s.tinline.com 269s\.com 2ndmortgageinterestrates.com 2twinks.com 30-60-90-day-sales-plan\.com 321cigarettes.com 3333.ws 35tk\.com 365jp.com 3ccenter\.com 3host.com 3-sexy.com 3sheng.net 3sixtyfour.com https://www.mercurial-scm.org/wiki/BadContent
15.Travellers'GuideToChinaWikiTravelGuideThere are many ways to study Chinese language in China. Most people study two different ways, either at a program associated with a University or private language school. The other two main options are hiring a private language tutor or finding a Chinese person to do language exchange with. http://www.travellerspoint.com/guide/China/
16.LettersfromChinaandJapan,byJohnDeweyandAliceChipmanHe has some of this tea which was given him by the Chinese ambassador and so I hope we may get a taste of it.He explained for about half an hour or more his theory of life (he is purely a Confucianist and not a religionist of any kind), and what https://www.gutenberg.org/files/31043/31043-h/31043-h.htm
17.c#实现万年历示例分享万年历农历查询C#教程public class ChineseCalendar { #region 内部结构 private struct SolarHolidayStruct { public int Month; public int Day; public int Recess; //假期长度 public string HolidayName; public SolarHolidayStruct(int month, int day, int recess, string name) https://www.jb51.net/article/46233.htm
18.Hello题目答案解析,Hello题目答案解析2A: At the gate at least half an hour before the concert starts.B: 【5】A: You’re welcome.A.When will it startB.You can book it on As Chinese people, 【5】 so proud of it! 免费查看参考答案及解析 题目: —Is that Miss Liu Let’s go up to say hello to her.—No. Ithttps://www.12tiku.com/newtiku/so-Hello-l2.html
19.专题02任务型阅读10篇(湖南省最新题型)WhenIwas12yearsold,mymothersentmetoaChineseschoolinCalifornia.IhatedspendingmySaturdaysinathree-hourChineseclass.Ithoughtitwasdifficultandboring. However,mymumthoughtthatIshoulddevelopandimprovemyChineselanguageskills.Iseemedtoknowitwoulddomegoodinfuture,butatthattimeIcouldn’trealizetheadvantagesoflearningasecondhttps://max.book118.com/html/2024/0619/7123166006006123.shtm
20.winform显示中国农历lunardatewinform/// /// private string GetChineseHour(DateTime dt) { int _hour, _minute, offset, i; int indexGan; //string ganHour, zhiHour; string tmpGan; //计算时辰的地支 _hour = dt.Hour; //获得当前时间小时 _minute = dt.Minute; //获得当前时间分钟 if (_minute != 0) _hour += 1; offsethttps://blog.csdn.net/iopheima123/article/details/6318967
21.获得农历数据51CTO博客}#endregion//////中国农历类 版本V1.0 支持 1900.1.31日起至 2049.12.31日止的数据//////<remarks>///本程序使用数据来源于网上的万年历查询,并综合了一些其它数据///</remarks>publicclassChineseCalendar {privatestaticChineseLunisolarCalendar calendar =newChineseLunisolarCalendar();#region内部结构privatestruhttps://blog.51cto.com/u_15047484/3869746