Traditional Culture Encyclopedia - The 24 Solar Terms - What about heavenly stems and earthly branches? Is there a formula?
What about heavenly stems and earthly branches? Is there a formula?
Function sTerm(y, n) {
Var offDate = new date ((31556925974.7 * (y-1900)+terminfo [n] * 60000)+date. UTC( 1900,0,6,2,5))
return(offDate.getUTCDate())
For example, check the trunk and branch days of April 1 day, 2006. Substitute the numerical value into the calculation formula.
g = 4 * 20+[20/4]+5 * 06+[06/4]+[3 *(4+ 1)/5]+ 1-3 = 197
z = 8 * 20+[20/4]+5 * 06+[06/4]+[3 *(4+ 1)/5]+ 1+7+6 = 2 13
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. Odd months i=0 and even months i=6. The remainder of g divided by 10 is heavenly stems, and the remainder of z divided by 12 is earthly branches.
When calculating, the number with [] indicates rounding.
- Previous article:Iphone lock screen shows lunar date settings.
- Next article:Audi a4 air intake system leaks.
- Related articles
- What is the high fuel consumption after LaVida maintenance?
- Zotye Z 100 What color is the engine throttle fault indicator?
- What is the reason for the loud noise of motorcycles?
- What is the adjustment method of motorcycle valve clearance?
- How to make money in stock trading?
- How to install motorcycle throttle line
- What if there is carbon deposit in the car? These three methods are easy to solve. Have you learned them?
- What month is the season of mulberry (on the advantages of mulberry)
- LaCrosse 3.0 Throttle Body Replacement Method
- Who is the expert in calculating whether the boy on July 3, 20091day 12: 30 is a boy?