Comparison of lunar calendars with the yang calendar

zhaozj2021-02-12  124

Many people want to find the quality calendar of their own lunar calendars. For this very simple question, the long-year-old calendar is also very difficult for friends who do not often go online, I am determined to solve this problem.

Below I wrote a Java applet, using some existing resources online, you can enter your own lunar calendar or rigorous birthday, and click "Submit" to see the change after the transition. hope its good for U.S..

http://three.freejsp.net/yuanqingfei/

Thank http://www.freejsp.neet/?id=yuanqingfei provides space support

Sender: hjdwg (small fish), letter area: Mathtools Title: Re: Who has a lunar calendar and a rigorous calendar service station: BBS Shuimu Tsinghua Station (Sat May 31 21:20:25 2003), transferred I used MATLAB to do one, now it is posted.

Function XX = Lunarcalendar (Y, M, D)% Function XX = Lunarcalendar (Y, M, D)%% Lunar Query 0; cccc = clock; y = cccc (1); m = cccc (2); d = CCCC (3); end animals = {'rat', 'cattle', 'tiger', 'rabbit', 'dragon' , 'Snake', 'horse', 'sheep', 'monkey', 'chicken', 'dog', 'pig'}; solarterm = {'little cold', 'big cold', '立 春', 'rainwater', ' Shocked ',' Spring Point ', ...' Qingming ',' Valley ',' Lixia, 'Xiaoyu', 'Mang,' Summer Summer, ... 'Summer', 'Strong', 'Autumn', ' Summer ',' Bai Lu ',' Autumn Item ', ...' Holden ',' Frost ',' Large ',' Snow ',' Snow ',' Winter Solo '}; CNDAYSTR = {' First ',' Junior ',' First three ',' first four ',' first five ', ...' first six ',' first seven ',' first eight ',' Jijiu ',' Jujie 10 ', ...' One ',' 12 ',' Thirteen ',' 14th ',' 10th ', ...' '16', '17', '18th', '19', 'Twenty' , ... '一', '廿 二', '三', '四', '五', ... '六', '廿七', '廿八', '九',' Thirty '}; cnmonthstr = {' positive ',' two ',' three ',' four ',' five ',' six ',' seven ',' eight ',' nine ',' 10 ' , 'Winter', 'Law'; Monthname = {'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', ' Oct ',' Nov ',' DEC '}; lunarinfo =

[19416, 19168, 42352, 21717, 53856, 55632, 91476, 22176, 39632, 21970, ... 19168, 42422, 42192, 53840, 119381, 46400, 54944, 44450, 38320, 84343, ... 18800, 42160 , 46261, 27216, 11104, 38256, 21234, 18800, ... 25958, 54432, 59984, 28309, 23248, 11104, 11067, 37600, 116951, 51536, ... 54432, 12098, 46416, 22176 , 107956, 9680, 37584, 53938, 43344, 46423, ... 27808, 46416, 86869, 19872, 42448, 833315, 21200, 43432, 59728, 27296, ... 44710, 43856, 19296, 43748, 42352, 21088 , 62051, 55632, 23383, 12176, ... 38608, 1992, 54484, 53840, 54616, 46400, 46496, 103846, ... 38320, 18864, 43380, 42160, 45690, 27216, 27968, 44870 , 43872, 38256, ... 19189, 18800, 25776, 29859, 59984, 27480, 21952, 43872, 38613, 37600, ... 51552, 55636, 544432, 55888, 30034, 22176, 43959, 9680, 37584, 51893 , ... 43344, 46240, 477780, 44368, 21977, 19360, 42416, 86390, 21168, 433312, ... 31060, 27296, 44368, 23378, 29296, 42726, 42208, 53856, 60005, 54576, ... 23200, 30371, 38608, 19415, 19152, 42192, 118966, 53 840, 54560, 56645, ... 46496, 22224, 21938, 18864, 42359, 42160, 43600, 111189, 27936, 44448]; LyeardAys =

[384,354,355,383,354,355,384,354,355,384, ... 354,384,354,354,384,354,355,384,355,384, ... 354,354,384,354,354,385,354,355,384,354, ... 383,354,355,384,355,354,384,354,384,354, ... 354,384,355,354,385,354,354,384,354,384, ... 354,355,384,354,355,384,354,383,355,354, ... 384,355,354,384,355,353,384,355,384,354, ... 355,384,354,354,384,354,384,354,355,384, ... 355,354,384,354,384,354,354,384,355,355, 384,354,354,383,355,384,354,355,384,354 ..., .. . 354,384,354,355,384,354,385,354,354,384, ... 354,354,384,355,384,354,355,384,354,354, ... 384,354,355,384,354,384,354,354,384,355, ... 354,384,355,384,354,354,384,354,354,384, ... 355,355,384,354,384,354,354,384,354,355]; leapDays = [29,0,0,29,0,0,30,0,0,29, ... 0, 29, 0, 0, 30, 0, 29, 0, 30, ... 0, 0, 29, 0, 0, 30, 0, 0, 29, 0, ... 29, 0, 0, 29, 0, 0, 30, 0, 10, ... 0, 30, 0, 10, 30, 0, 0, 29, 0, 29, ... 0, 0, 30, 0, 0, 30, 0, 29, 0, 0, ... 29, 0, 0, 29, 0, 0, 29, 0, 29, 0, ... 0, 29, 0, 0, 29, 0, 29, 0, 0, 30, .. 0, 0, 29, 0, 0, ... 29, 0, 0, 29, 0, 29, 0, 0, 29, 0, ... 0, 29 0, 0, 29, 0, 29, 0, 0, 29, ... 0, 0, 29, 0, 29, 0, 0, 30, 0, 0, ... 29, 0, 0, 29 , 0, 29, 0, 0, 29, 0, ... 0, 29, 0, 29, 0, 0, 30, 0, 0, 29, ... 0, 0, 29, 0, 29, 0 0, 30, 0, 0]; LeapMonth =

[8, 0, 0, 5, 0, 0, 4, 0, 0, 2, ... 0, 6, 0, 0, 5, 0, 0, 2, 0, 7, ... 0, 0 , 5, 0, 0, 4, 0, 2, 0, ... 6, 0, 0, 5, 0, 0, 3, 0, 7, 0, ... 0, 6, 0, 0 4, 0, 0, 2, 0, 7, ... 0, 0, 5, 0, 0, 3, 0, 8, 0, 0, ... 6, 0, 0, 4, 0, 0 3, 0, 7, 0, ... 0, 5, 0, 0, 4, 0, 8, 0, 0, 6, ... 0, 0, 4, 0, 10, 0, 0, 6 0, 0, ... 5, 0, 0, 3, 0, 8, 0, 0, 0, ... 0, 4, 0, 0, 2, 0, 7, 0, 0, 5 , ... 0, 0, 4, 0, 9, 0, 0, 6, 0, 0, ... 4, 0, 0, 2, 0, 6, 0, 0, 5, 0, ... 0, 3, 0, 7, 0, 0, 6, 0, 0, 5, ... 0, 0, 2, 0, 7, 0, 0, 5, 0, 0]; Offset = Datenum (Y, M, D) -datenum (1900, 1, 31) 1; daycyl = offset 40; Moncyl = 14; cumlyeardays = cumsum ([0, LyeardAys]); LunaryEar = Find (Offset> cumlyearDays); lunaryear = lunaryear end); monCyl = monCyl (LunarYear-1) * 12; yearCyl = LunarYear 36; offset = offset-cumLYearDays (LunarYear); monthDays = [29,30]; monthDays = monthDays ((bitand (lunarInfo (LunarYear), bitshift (65536, - (1:12))) ~ = 0) 1); Leap = Leapmonth (Lunaryear); if leap, monthdays = [Monthdays (1: Leap), LeapDays (Lunaryear), Monthdays (Leap 1: End)]; end cummonthdays = c umsum ([0, monthDays]); LunarMonth = find (offset> cumMonthDays); LunarMonth = LunarMonth (end); offset = offset-cumMonthDays (LunarMonth); ch_run_ch = ''; if leap if LunarMonth == (leap 1) , ch_run_ch = ''; endiff (lunarmonth> leap), lunarmonth = lunarmonth-1; end end moncyl = moncyl lunarmonth; xx = ['Lunar calendar', Animals {REM (YearCyl-1, 12) 1}, 'Year', CH_Run_CH, CNMONTHSTR {Lunarmonth}, 'Moon', CNDAYSTR {Offset}]; XX = {xx; [Cyclical (Yearcyl), 'Year', Cyclical (Moncyl), 'Moon', CycLical (Daycyl), 'Day']}; Return Function Ganzhi = Cyclical (NUM) GaN = {'A', 'B', '

C ',' Ding ',', ',', 'Geng', 'Xin', '', '}; zhi = {' Subride ',' Ugly ',' 寅 ',' ' , '', '巳', '午', 'is not', 'Shen', '酉', '', 'Hai'}; ganzhi = [GaN {REM (NUM-1, 10) 1} {REM (NUM-1, 12) 1}]; [Number of Abcxyz2008 (wood) mentioned in the masterpiece:]: Everyone, where there is a lunar calendar and the rigorous calendar, I know a day of the cumulus, I want I know how much is the lunar calendar, how: Do? Where is there a long history? - ※ Source: · BBS Shuimu Tsinghua Station smth.org · [From: 211.68.68.167] By the way, introduce my own birthday, huh >> Lunarcalendar (1981, 3, 23) ANS =

'Lunar New Year's Eve 18th' 'Xin Yinni Xin Yue Moon Heng Jindian