Traditional Culture Encyclopedia - Almanac inquiry - How to mark the month and day with Jiazi?

How to mark the month and day with Jiazi?

It is simple to calculate the chronology of trunks and branches from known years: the number of years is reduced by 3, the remainder is divided by 10, and the remainder is divided by 12.

Branches.

The formula for calculating the branch date from the known date is very similar to the formula of the lottery, as shown below:

g = 4C+[C/4]+5y+[y/4]+[3 *(M+ 1)/5]+d-3

Z = 8c+[c/4]+5y+[y/4]+[3 * (m+1)/5)+d+7+I (i=0 in odd months and i=6 in even months).

Where c is the number of centuries minus one, y is the last two digits of the year, m is the month and d is the number of days. 65438+ 10 and February are calculated according to 65438+March and 65438+April of the previous year. The remainder of g divided by 10 is heavenly stems, and the remainder of z divided by 10 is earthly branches.

20 10 1 June 1 is the ugly year of Xinhai.