Traditional Culture Encyclopedia - Almanac inquiry - How to calculate the heavenly stems and earthly branches Chronology?

How to calculate the heavenly stems and earthly branches Chronology?

Heavenly stems and earthly branches chronology algorithm is as follows:

The calendar year formula of heavenly stems and earthly branches is as follows: the number of years in A.D. minus three, the rest are heavenly stems except 10, the cardinal number is divided by 12, and the rest are earthly years. Take 202 1 year as an example, the base number of subtracting 3 in this year is 20 18, which is divided by 10 to get the remainder of 8, and the remainder of 8 is the odd weather. Then, the base number of 20 18 is divided by 12 to get the remainder of 2, and the ugly ground branch is recovered.

China used the chronology of cadres and branches in ancient times, and the nouns mentioned in modern history, such as the Sino-Japanese War, the Reform Movement of 1898, and the Revolution of 1911, are all the chronology of cadres and branches. The so-called trunk branch is the abbreviation of ten-day trunk branch and twelve-day branch. Heavenly stems and earthly branches is in accordance with certain laws (Yang trunk with Yang branch, Yin trunk with Yin branch. Or single or double pairs) can be made into 60 pairs, that is, a nail (60 years), and the time is repeatedly recorded.

Tiangan: Ten Tiangan include A, B, C, D, E, F, G, Xin, nonyl and decyl, in which A, C, E, G and nonyl are yang-dried, while B, D, F, Xin and decyl are yin.

Earthly branches: Twelve earthly branches include Zi, Ugly, Yin, Mao, Chen, Si, Wu, Wei, Shen, You, Xu and Hai, among which Zi, Yin, Chen, Wu, Shen and Xu are Yang branches, and Ugly, Mao, Si, Wei, You and Hai are Yang branches. Heavenly stems and earthly branches's chronology formula is: "The number of years in A.D. is reduced by three, except 10, the remainder is heavenly stems, the radix is divided by 12, and the remainder is the year of earthly support."

Take 202 1 year as an example. If you subtract 3 from the year, the radix is 20 18, and if you divide by 10, the remainder is 8. Inspection sequence (A, B, C, D, E, G, Xin, Ren and Gui). Get "Xin", then divide the radix 20 18 by 12 to get the remainder of 2, and recover the "Ugliness" in the branch order (Zi, Ugly, Yin, Mao, Chen, Si, Wu, Wei, Shen, Unitary, Xu, Hai). Therefore, 202 1 is an ugly year (if you get 0, you can understand it as 1, that is, 12).