Traditional Culture Encyclopedia - Almanac inquiry - Lunar leap month

Lunar leap month

The year, month and day of the lunar calendar are calculated according to formulas, unlike the western calendar, which forcibly stipulates which month is the big month and which month is the small month. To calculate the positions of big and small months, flat leap years and leap months, we must follow the formula. Below we give the calculation formula.

Calculation of year

1 heavenly stems and earthly branches is calculated from the year of AD: the number of years in the lunar calendar is reduced by 3, and the remainder divided by 10 is the heavenly stem, and the remainder divided by 12 is the earthly branch. For example: (20 10-3)mod 10 = 7, so the aerial stem is "Geng" (20 10-3)mod 12 = 3, so the ground branch is "Yin". 2. Calculation of cumulative days (used to calculate the month): convert the current year's 65438+1October 0 into cumulative days, and the number of years obtained by subtracting 1900 from this year can be evenly divided by 4, and the quotient obtained is y(D4), the remainder is y(M4), and the year (M4) where y is zero is a leap year in the Gregorian calendar. The product date is d (1) =1461* y (D4)-1y (M4). The non-zero year is the Gregorian calendar year, and the accumulated day is d( 1)= 14 1 *.

Determination of month

Calculate the cumulative day F(0) of the winter solstice in the previous year, and use F(0) to calculate the month m and its day M(0), so that the lunar calendar date of the winter solstice can be calculated. The lunar month in which the winter solstice is located is always 1 1 month. Calculate the next neutral gas F( 1) and the next solar day M( 1). If F (1) "M (1)", then this month is the leap month of last month. This neutral gas is taken as F(2), followed by neutral gas, new moon and Tai.

Shuori calculation

The formula of the mth shuori from 1900 is m =1.6+29.5306 * m+0.4 * sin (1-0.45058 * m). The error of this formula is about 0.2 days.

Calculation of solar terms

The solar terms are numbered first, and the first solar term from the perihelion is numbered 0. The figures and corresponding months are as follows: 0 slight cold and twelfth lunar month 6 Qingming March 12 slight summer June 18 cold dew September 1. Great cold and the seventh day of the twelfth lunar month Grain Rain March 13 summer heat June 19 first frost September 2. Beginning of spring 1 8th Long Summer April14th beginning of autumn July 20th beginning of winter13rd October. All April 15 Xia 2 1 Xiaoxue1October 4. Stunned in February 10 Miscanthus May 16 Bailu August 22 nd Snow Winter May 5 th. The vernal equinox February1/summer solstice May1July autumn vernal equinox August 23rd winter solstice winter month date) is called the cumulative day, so the cumulative day of X solar terms in year Y (the 0 th year of 1900) is f = 365.242 * y+6.2+.