Traditional Culture Encyclopedia - The 24 Solar Terms - Does anyone know how to write js's lunar calendar algorithm?
Does anyone know how to write js's lunar calendar algorithm?
Actually, I don't understand this algorithm either. I posted it on the internet. I don't think we need to delve into this formula. Anyway, there are ready-made codes:
Suppose: the number of AD years-1977 (or1901) = 4q+r.
Then: Lunar date =14q+10.6 (r+1)+date ordinal of the year-29.5n.
(Note: in the formula, q, r and n are all natural numbers, r
For example: Lunar date1May 7, 994 is:
1994- 1977= 17=4×4+ 1
So q = 4, r = 1, so the seventh day of the fifth lunar month is:
14×4+ 10.6( 1+ 1)+(3 1+28+3 1+30+7)-29.5n
= 204.2-29.5 Newton
Then divide 204.2 by 29.5 to get the quotient 6...27.2, where 6 is the value of n and the remainder 27 is the 27th day of the lunar calendar.
- Related articles
- 20 19 what is the solar term from the date of entering the ninth lunar month?
- What traditional festivals are legal holidays in China?
- Happy greetings of long summer solar terms
- What did it mean to grow wheat in cold dew at that time?
- Solar terms and light snow, what does it mean to enter winter?
- Do you have primary school Tang poems? I want both.
- What color is the fsv throttle signal line in Jie Jun, China?
- What is the knock of a car and what effect will it have on the engine?
- What is the reason for the fog on the river?
- What should we pay attention to when it rains and solar terms?