A simple algorithm formula for calculating the chronology of trunk and branch

Guide: When we query the calendar, we will see two representations, one is the digital version of the Gregorian calendar year, and the other is the text version of the Lunar calendar year. The Gregorian calendar year is increased by one every year, and the lunar calendar year is different. The calculation method is called the trunk-branch calendar. So, how to calculate the chronology of trunk and branch? What is the simple algorithm formula of trunk and branch chronology? Come and have a look with me.

How to calculate the chronology of trunks and branches

The first method: firstly, the heavenly stems are coded;

Party A, Party B, Party C, Party D, Party E, Party B, Party G, Party A, Party B, Party C and Party B..

4、 5、 6、 7、 8、 9、 0、 1 、 2、 3

Where the last digit (single digit) of a year after A.D. is "4", the heavenly stems of that year are "A"; "5" is "b"; I am an analogy. For example, in 2003, it was very dry. Remember that this code is very practical. Although we can't directly use the year of the stem to calculate the AD year, it can give us a hint that the last digit of the AD year with the heavenly stem as "A" must be "4"; "Letter" is "1"; I am an analogy. For example, the last digit of the Xin You coup (186 1), the Xin Chou Treaty (190 1) and the Xinhai Revolution (19 1 1) is "1"

A famous year in the history of China.

Many important events in the history of China were named after the official support of that year: Xinyou coup (the Seven-Xiang coup), Sino-Japanese Sino-Japanese War of 1894-1895, the Reform Movement of 1898 (the Hundred Days Reform), boxer indemnity, the treaty of Xin and Chou, the academic system of Guimao, the Revolution of 1911 and so on.

The reason is that the "AD Chronology Law" was not used at that time, and it was not used until 19 12 when the Republic of China was founded.

Xinyou coup (1)-took place in 186 1 year, which was a year in the lunar calendar, and Empress Dowager Cixi seized power.

② Sino-Japanese War of 1894-occurred in 1894, the Yellow Sea War between China and Japan.

(3) The Reform Movement of 1898-occurred in 1898, the year of the Reform Movement of 1898, and lasted only 103 days.

(4) boxer indemnity-It happened in 1900, the year of Gengzi in the lunar calendar, and Eight-Nation Alliance attacked China.

(5) The Treaty of Love and Ugliness —— It happened in 190 1 year and was signed in the year of love and ugliness in the lunar calendar, making China a semi-colonial and semi-feudal society.

(6) Guimao academic system-occurred in Guimao year of the lunar calendar 1905, and the last academic system reform in the late Qing Dynasty abolished the imperial examination system.

(7) Xinhai Revolution-occurred in 19 1 1 year. In 1911, the uprising overthrew the Manchu rule.

Then the ground branch is coded:

Zi, Ugly, Yin, Mao, Chen, Si, Wu, Wei, Shen, You, Xu and Hai

4、 5、 6 、7、 8、 9、 10、 1 1、 0、 1、 2、3

Divide the number of a year by 12, and the remainder is "4", then the branch of the year is "child"; The remainder of "5" is "ugly"; And so on. Mental arithmetic can subtract the multiple of 12 from the number of years, such as 1800, 1860, 1920, 1980, etc. It is much easier to calculate again.

Finally, heavenly stems and earthly branches together, that is, the Gregorian calendar year in heavenly stems and earthly branches. For example, 186 1 year, the last digit is "1", and the heavenly stems are "Xin". Divide by 186 1 (or 186 1 minus 188).

According to the age of 60, we can work out the specific year, month, day and time. In the use of timing, because a day is twenty-four hours, which happens to be twelve o'clock in ancient times, the conversion relationship between two hours and one hour is formed. Specifically, from 23: 00 to midnight 1, 1-3 is ugly, 3-5 is Yin Shi, 5-7 is Shi Mao, 7-9 is Chen Shi and 9-6544 is Chen Shi. 1 1- 13 is noon, 13- 15 is inappropriate, 15- 17 is the application time,17-/kloc. In addition to this timing method, another branch timing method is also related to the calculation of branch days, forming a sixty-branch timing method, that is, the date of Jiaxu begins with A, when it becomes Jiazi, it becomes ugly, when it becomes ugly, and so on. When the date of B Geng begins with C, it becomes C; Bing Xin Tian began with e and became a pentathlon. Ding Ren's days began with Geng and he became a boxer. When Pentecost began with nonyl, it became nonyl. In this way, 60 days of heavenly stems have formed a complete chronological method, and everyone will have a definite date of birth consisting of four groups of heavenly stems and eight characters, which is called "eight characters" for short. At this time, it is 165438+ 10/5, 2005 (October 14th of the lunar calendar). The horoscope of the person born at this time is the year of Yiyou, and the date of Guimao in Dinghai is Ren Xu (because it is decyl on that day, it is calculated that it is 65438 when the child is a child today.

Method 2: Formula method:

1, and the calculation formula for the year after AD is: "The number of years in A.D. is reduced by three first, and divided by 10, the remainder is heavenly stems, the cardinal number is divided by 12, and the remainder is the year of earthly support". Take the year 19 1 1 as an example. If the base of the year is 1908, divide it by 10 to get the remainder 8, and check the order of heaven and earth (A, B, C, D, E, Ji, G, Xin, Ren and Gui). Get "Xin", then divide the radix 1908 by 12, and the remainder is 0 (it can be understood as 1 2 before1). Check the order of geographical branches (Zi, Ugly, Yin, Mao, Chen, Si, Wu, Wei, Shen and You).

2. To calculate the year of BC, "add three to the number of years of BC, and the remainder is heavenly stems, except 10, and the radix is divided by 12, and the remainder is the year of earthly branches", but when checking the order of earthly branches, it can be pushed backwards from back to front. Take 40 BC as an example. If the base number is 43 when the year is added with 3, the remainder is 3 when divided by 10, the heavenly stems are "Xinsi", and the remainder is 7 when divided by 12, then 40 BC should be "Xinsi" year.

Among them, it is difficult to convert the calendar year of AD and the calendar year of trunk and branch. For example, what year were the trunks and branches in 2004? Here is a simple calculation method.

(1) First of all, remember that ten days work and twelve branches work. (2) Then, we must remember the year of A.D. and the year of a historical event, such as 19 1 1. Then you can use this as a point to calculate. For example, knowing that 19 1 1 is the year of Xinhai, I ask you what year is 2004? The calculation steps are as follows: (1) First, 2004-191= 93 (2) and then 93÷ 10=9+3, and use this remainder 3 to determine the weather. (that is, if there is no remainder, the dryness in 2004 is the same as 19 1 1, that is, "Xin"; If the remainder is 1, then the heavenly stems in 2004 are the words after "Xin" in 19 1 1, that is, "Ren". And so on. ) that is, Tiangan in 2004 is the third word after Xin, namely "A". (2) Use 93÷ 12=7 and 9, and use this remainder 9 to fix the ground. (The method is the same as above), that is, the earthly branch in 2004 is the ninth word after "hai", that is, "Shen" (3) The year of earthly branch in 2004 is.

Simple algorithm formula of trunk and branch chronology

10 day drying: a, b, d, e, g, n, n.

12 earthly branch: Zi Chou Mao Yinchen was at noon in Xu Hai, Shen You.

General formula for calculating heavenly stems and earthly branches calendar year;

Heavenly dryness calculation method: year minus 3 divided by 10, the corresponding heavenly dryness word is dryness.

Calculation method of earthly branch: the word corresponding to the remainder obtained by subtracting 3 from the year and dividing it by 12 is earthly branch.

For example: 20 1 1 year

The remainder of the calculation of heavenly stems: (2011-3)/10 is 8, corresponding to heavenly stems: symplectic, which is the stem of this year.

Calculate the earth branch: the remainder of (2011-3)/12 is 4, and the corresponding earth branch is the word: Mao, which is this year's branch.

So 20 1 1 is the year of xinmao.

For example, the Sino-Japanese War took place in 1894, and Eight-Nation Alliance's invasion of China in 1900 should be the year of boxer.