This jewel from the old forums, should exist here in more approachable way in my humble opinion.
So will copy/paste from archive.org the practical aspect. Link to the topic in there will be below.
If someone remembers/knows the name of the member that posted it back then I would be interested to know. : )
Friends,
I just joined this site a few days, and I am happy that there are many people like me, want to learn and understand QMDJ, not very fluent in Chinese and not much money to spare for those called themselve teachers without proper understand of the art and dare charge few thousands dollars for a course.
How to calculate Ju number has been a secret for those who really could not understand the concept, but for those who understand it is just a simple matter. All you need to know is the date and time of 3 Solstices.
December Solstice of previous year, June Solstice and December Solstice of the year interested.
These Solstice can be calculated using modern astronomy formulas or simply get it from Wikipedia!!!
First thing you need to know how to calculate Stem and Branch of any date in the year. Here is the formula:
Sum of Days, Sd(yyyy.mmdd) = 365 * (yyyy - 1) + Int((yyyy – 1)/4) – Int((yyyy – 1)/100) + Int((yyyy – 1) /400)
……………………………………………………+ Int((367 * mm – 362)/12) + dd + leapcheck
where leapcheck = 0 if mm <= 2
…………………..........= 1 if mm > 2 and yyyy is a leap year
= 2 otherwise
yyyy is the year number
mm is the month
dd is the day
all using Western Calendar date.
Day-Stem = (Sd(yyyy.mmdd) + 15) Amod 10
Day-Branch = (Sd(yyyy.mmdd) + 15) Amod 12
Let define the operation Mod and Amod
X Mod Y = the remainder of X / Y
X Amod Y = the remainder of X / Y with the exception that if the remainder is 0, it has the value of Y instead!
In Mathmatics term:
X Mod Y = (X – 1) Mod Y + 1
Next formula to calculate the 60 cyclic number or Sexagesimal number of the Stem-Branch pair.
Let the order pair (x,y) represent the Stem x (1,2,3,4,5,6,7,8,9,10 corresponding to 10 stems), and branch y (1,2,3,4,5,6,7,8,9,10,11,12 corresponding to 12 branches or animals).
The first of the 60 cyclic number is (1,1), and the last is (10,12)
The Sexagesimal number of (1,1) is 1, and of (10,12) is 60
Here is the formula:
Sexagesimal Number, SexNo = ((Stem – Branch)/2) Amod 6) * 10 + Stem
Next step is to consider the different in time zone. If the date and time of the Solstices are in different UTC time zone than your, you need to convert to your time zone. For all those teacher, or people that said you don’t need to use local time, they need to understand this, every one of the 24 Solar Term is 15 degree of Sun Longitude, at the moment the Sun Longitude is 270 degree (Winter or December Solstice), the time on Earth is not the same everywhere, but it is different accroding to what time zone you are in. Let say the date and time of the December Solstice is December 21, 17:47 in UTC0, China is in time zone UTC+8, now 17:47 + 8 = 25:47, which is 1:47 of the next day. So December Solstice for China occurs at December 22, 1:47, not on December 21!!!!!
After obtaining the 3 Solstices (the beginning Dec Solstice, Jun Solstice, and the ending Solstice), you need to convert them to your time zone, then calculate the Stem-Branch for the 3 dates, and their sexagesimal number.
Nothing teach better than examples, let calculate all the Ju for 2010.
According to Wikipedia, the 3 Solstices are as followed:
Dec Solstice 2009: 21, 17:47
Jun Solstice 2010: 21, 11:28
Dec Solstice 2010: 21, 23:38
For China time zone, it is UTC+8, so the corrected date and time of the 3 Solstices are:
Dec Solstice 2009: 22, 1:47
Jun Solstice 2010: 21, 19:28
Dec Solstice 2010: 22, 7:38
Now let calculate the Stem-Branch for the day.
Dec Solstice 2009, 22, 1:47
Sd = 365 * 2008 + 502 – 20 + 5 + 336 + 22 + (-2) = 733763
Stem = (733763+15) Amod 10 = 8
Branch = (733763+15) Amod 12 = 2
SexNo (Sexagesimal Number) = ((8-2)/2) Amod 6 * 10 + 8 = 38
Jun Solstice 2010, 21, 11:28
Sd = 365 * 2009 + 502 – 20 + 5 + 153 + 21 + (-2) = 733994
Stem = (733994+15) Amod 10 = 9
Branch = (733994+15) Amod 12 = 3
SexNo = ((9-3)/2) Amod 6 * 10 + 9 = 39
Dec Solstice 2010, 22, 7:38
Sd = 365 * 2009 + 502 – 20 + 5 + 336 + 22 + (-2) = 734128
Stem = (734128+15) Amod 10 = 3
Branch = (734128+15) Amod 12 = 7
SexNo = ((3-7)/2) Amod 6 * 10 + 3 = 43
By the way for X is negative number, X Amod Y, can be adding Y to X until it is positive, that is
(X + nY) Amod Y, where x < 0, for the case above, 3-7 = -4, -4/2 = -2, -2 + 6 = 4, 4 Amod 6 = 4!!!
Now we have
Dec Solstice 2009: 22, 1:47, StemBranch of Date (8,2), SexNo=38
Jun Solstice 2010: 21, 19:28, StemBranch of Date (9,3), SexNo=39
Dec Solstice 2010: 22, 7:38, StemBranch of Date (3,7), SexNo=43[/quote]
Once you have the Sexagesimal number for the 3 Solstices, you need to find the Top Yuan Stem-Branch for each Solstice.
What is a Yuan?
A Yuan is similar to a Dozen but instead of 12 units, it consists of 1/3 of 180 Stem-Branch pairs, or 3 Sexagesimal cycles. Each third is then called Top Yuan, Middle Yuan, and Bottom Yuan. A pair of Stem-Branch can denotes a Stem-Branch of a double hour, a day, a month, a year, vv…
In the Hour-method of QMDJ, 60 double hours (or hour Stem-Branches) is 5 days, therefore 3 Yuan, Top Middle Bottom of hour Stem-Branch is 15 days, which each roughly one solar term..
Each day also has a day Stem-Branch, therefore 3 Yuan of hour Stem-Branch corresponding to 15 day Stem-Branch.
In the Sexagesimal cycle of 60 Stem-Branches, with Top, Middle, and Bottem Yuan, each consisted of 5 days we have as follow:
SexNo(Stem,Branch)
Top Yuan: 1(1,1), 2(2,2), 3(3,3), 4(4,4), 5(5,5)
Middle Yuan: 6(6,6), 7(7,7), 8(8,8), 9(9,9), 10(10,10)
Bottom Yuan: 11(1,11), 12(2,12), 13(3,1), 14(4,2), 15(5,3)
Top Yuan: 16(6,4), 17(7,5), 18(8,6), 19(9,7), 20(10,8)
Middle Yuan: 21(1,9), 22(2,10), 23(3,11), 24(4,12), 25(5,1)
Bottom Yuan: 26(6,2), 27(7,3), 28(8,4), 29(9,5), 30(10,6)
Top Yuan: 31(1,7), 32(2,8), 33(3,9), 34(4,10), 35(5,11)
Middle Yuan: 36(6,12), 37(7,1), 38(8,2), 39(9,3), 40(10,4)
Bottom Yuan: 41(1,5), 42(2,6), 43(3,7), 44(4,8), 45(5,9)
Top Yuan: 46(6,10), 47(7,11), 48(8,12), 49(9,1), 50(10,2)
Middle Yuan: 51(1,3), 52(2,4), 53(3,5), 54(4,6), 55(5,7)
Bottom Yuan: 56(6,8), 57(7,9), 58(8,10), 59(9,11), 60(10,12)
In the above list of every Stem-Branch pair in the 60 cycle, we see that every Top Yuan ALWAYS has one of the 4 following Stem-Branch pairs: 1(1,1), 16(6,4), 31(1,7), 46(6,10).
A non-leap-Ju year in QMDJ will has exactly 360 day, or 360 day Stem-Branch. The first half of 360 days cycle starts with Top Yuan Stem-Branch of December Solstice, the second half starts with Top Yuan Stem-Branch of June Solstice. 180 has 3 Sexagesimal cycles.
The secret of knowing when there is a leap Ju occurs is based on understanding the repeating cycle of 60 Stem-Branch. Here it is:
In non-leap-Ju year, the Top Yuan Stem-Branch of the Winter Solstice and the next Winter Solstice has to be the same, so is the Stem-Branch for the June Solstice. If they are different, there will be a Leap Ju.
Why? Because a non-leap-Ju year has exactly 360 Stem-Branch, the Top Yuan Stem-Branch of the next Winter Solstice has to repeat the same Stem-Branch!!!
How to find the Top Yuan Stem-Branch?
Almost every old manuscript on QMDJ has repeat the same old principle. When the actual Solar Term occurs more than 9 days before the Top Yuan Stem-Branch, use the next Top Yuan Stem-Branch (Chao Shen principle).
Almost every one study QMDJ know this principle, but not many know that one only need to apply this principle to two Winter Solstices, and adjust the Stem-Branch for June Solstice in the case that the two Winter Solstices have different Stem-Branch pairs.
Once you have the SexNo of the Stem-Branch, calculate SexNo Amod 15
If SexNo Amod 15 <= 9 then use the current Top Yuan Stem-Branch, Else use the next Top Yuan Stem-Branch
Remember, the 4 Sexagesimal numbers of the Top Yuan Stem-Branch and their sequence:
1(1,1), 16(6,4), 31(1,7), 46(6,10)
Let define this Integer division call Div
X Div Y = Int(X/Y), that is just the integer quotient of X divided by Y.
Therefore:
If SexNo Amod 15 <= 9, the current Top Yuan Stem-Branch is (SexNo Div 15) * 15 + 1
If SexNo Amod 15 > 9, the current Top Yuan Stem-Branch is ((SexNo Div 15) + 1) * 15 + 1
In simpler term:
Let SexNo / 15 = Q and R (Quotient Q and Remainder R), but when R = 0, R is 15 not 0
Then if R <= 9, the Top Yuan Stem-Branch is Q * 15 + 1
Else Top Yuan Stem-Branch is (Q + 1) * 15 + 1
Why when R = 0, make it R = 15? Because, SexNo / 15 will give misleading result when R is 0 (That why we use Amod 15)
In the example, we have so far:
Dec Solstice 2009: 22, 1:47, StemBranch of Date (8,2), SexNo=38
Jun Solstice 2010: 21, 19:28, StemBranch of Date (9,3), SexNo=39
Dec Solstice 2010: 22, 7:38, StemBranch of Date (3,7), SexNo=43
We calculate the Top Yuan Stem-Branch for the two Winter Solstices:
Dec Solstice 2009, SexNo = 38
38 / 15 = 2 Remainder 8, 8 <= 9, therefore Top Yuan Stem-Branch is 2 * 15 + 1 = 31 which is (1,7)
Dec Solstice 2010, SexNo = 43
43 / 15 = 2 Remainder 13, 13 > 9, therefore Top Yuan Stem-Branch is (2+1) * 15 + 1 = 46 which is (6,10)
Now Top Yuan Stem-Branch for both Winter Solstice are different 31(1,7) and 46(6,10), there will be a Leap Ju!!!
We now have the Top Yuan Stem-Branch for the two Winter Solstices, we need to find the corresponding date.
Dec Solstice 2009: 22, 1:47, SexNo = 38
Top Yuan Stem-Branch is 31, so we have to go back (38 – 31) = 7 days, that is Dec 22 – 7 days = Dec 15.
So the Start Date of the December Solstice 2009 is 29, 1:47, Day Stem-Branch 31(1,7)
Dec Solstice 2010: 22, 7:38, SexNo = 43
Top Yuan Stem-Branch is 46, which is (46 – 43) = 3 days ahead, that is Dec 22 + 3 = Dec 25.
So far we have obtained the start date of the two Winter Solstice according to QMDJ Top Yuan Stem-Branch principle. Hence we have so far
Dec Solstice 2009: 15, 1:47, SexNo = 31, Top Yuan Stem-Branch (1,7)
Jun Solstice 2010: 21, 19:28, SexNo = 39
Dec Solstice 2010: 25, 7:38, SexNo = 46, Top Yuan Stem-Branch(6,10)
From the difference in Top Yuan SexNo or Stem-Branch, we know there will be a leap Ju in 2010
Where do we put the Leap Ju?
Here is another important principle that has never been told in manuscripts or books, one will only know when examine many different QMDJ calendar!!!
The location of the Leap Ju depends on the Top Yuan of the June Solstice. The Top Yuan Stem-Branch or SexNo of the June Solstice is the one CLOSEST to the June Solstice Date.
Since for a non-leap-Ju year, the Stem-Branch of June Solstice is the same as the Stem-Branch of the Previous Winter Solstice, and the Next Winter Solstice. When the Stem-Branch of the two Winter Solstices is different, the June Solstice will take the CLOSEST one.
In the example we have 31(1,7), and 46(6,10) as the two ends of the 15 days Yuan.
Dec Solstice 2009 --------------|------------------ Jun Solstice -------------------|------------------------ Dec Solstice 2010
31 ---------------------------------|31 ---------------------- 39 ------------------- 46|------------------------ 46
-------------------------------------| 39 – 31 = 8 ------------| 46 – 39 = 7 ----------|---------------------------
The CLOSEST Top Yuan is 46.
By choosing Top Yuan 46 on the right as the start of Jun Solstice, we have extra 15 days to the left, therefore the Leap Ju is before the Jun Solstice that is to repeat the Ju of Solar Term Man Zhong.
However, if Top Yuan 31 was closer, we would have chosen it as the Top Yuan for Jun Solstice. In this case, there will be extra 15 days to the right, then the Leap Ju has to be before the Dec Solstice 2010, that is to repeat the Ju of Solar Term Da Xue.
Now we find the date of the Top Yuan 46 for Jun Solstice:
Jun Solstice 2010: 21, 19:28, SexNo = 39
Top Yuan Stem-Branch is 46, which is (46 – 39) = 7 days ahead, that is Jun 21 + 7 = Jun 28.
Finally, we have obtain the Top Yuan Stem-Branch and date for the 3 Solstice, we are ready to fill in the Ju for the whole year!!!
We have:
Dec Solstice 2009: 15, 1:47, SexNo = 31, Top Yuan Stem-Branch (1,7)
Jun Solstice 2010: 21, 19:28, SexNo = 46, Top Yuan Stem-Branch(6,10)
Dec Solstice 2010: 25, 7:38, SexNo = 46, Top Yuan Stem-Branch(6,10)
To make the task of filling in all the date and Ju easier, we group all the Solar Term in group of 4 to make the cycle of 60. Number ST01 to ST24 are used to denote the Solar Term, with ST01 denotes the Winter Solstice, and ST 13 is the Jun Solstice. We have the following table that can be reused years after years.
Dec -------------------------------- Feb -------------------------- Apr
(s,b) dd/mm ST01 1,7,4 -------- dd/mm ST05 9,6,3 -------- dd/mm ST09 5,2,8
(s,b) dd/mm ST02 2,8,5 -------- dd/mm ST06 1,7,4 -------- dd/mm ST10 4,1,7
(s,b) dd/mm ST03 3,9,6 -------- dd/mm ST07 3,9,6 -------- dd/mm ST11 5,2,8
(s,b) dd/mm ST04 8,5,2 -------- dd/mm ST08 4,1,7 -------- dd/mm ST12 6,3,9
(s,b) ----------------------------------------------------------------dd/mm Leap 6,3,9
Jun --------------------------------- Aug ------------------------- Oct
(s,b) dd/mm ST13 9,3,6 -------- dd/mm ST17 1,4,7 -------- dd/mm ST21 5,8,2
(s,b) dd/mm ST14 8,2,5 -------- dd/mm ST18 9,3,6 -------- dd/mm ST22 6,9,3
(s,b) dd/mm ST15 7,1,4 -------- dd/mm ST19 7,1,4 -------- dd/mm ST23 5,8,2
(s,b) dd/mm ST16 2,5,8 -------- dd/mm ST20 6,9,3 -------- dd/mm ST24 4,7,1
(s,b) ----------------------------------------------------------------dd/mm Leap 4,7,1
Dec
(s,b) dd/mm ST01 1,7,4
Since we know that each group of 4 will repeat the same Stem-Branch, and the sequence of Top Yuan is 1(1,1), 16(6,4), 31(1,7), 46(6,10). We can fill in the Stem-Branch for the date. We also have the date for the Top Yuan of 3 Solstices, we can fill in the Western date for each group. Since each Yuan is 15 days, all we need is adding 15 to the date of the previous Top Yuan. Finally we have the following table for the whole year of 2010
Dec ---------------------------------- Feb ------------------------ Apr
(01,07) 15/12 ST01 1,7,4 -------- 13/02 ST05 9,6,3 -------- 14/04 ST09 5,2,8
(06,10) 30/12 ST02 2,8,5 -------- 28/02 ST06 1,7,4 -------- 29/04 ST10 4,1,7
(01,01) 14/01 ST03 3,9,6 -------- 15/03 ST07 3,9,6 -------- 14/05 ST11 5,2,8
(06,04) 29/01 ST04 8,5,2 -------- 30/03 ST08 4,1,7 -------- 29/05 ST12 6,3,9
(01,07) -------------------------------------------------------------13/06 Leap 6,3,9
Jun ---------------------------------- Aug ------------------------ Oct
(06,10) 28/06 ST13 9,3,6 -------- 27/08 ST17 1,4,7 -------- 26/10 ST21 5,8,2
(01,01) 13/07 ST14 8,2,5 -------- 11/09 ST18 9,3,6 -------- 10/11 ST22 6,9,3
(06,04) 28/07 ST15 7,1,4 -------- 26/09 ST19 7,1,4 -------- 25/11 ST23 5,8,2
(01,07) 12/08 ST16 2,5,8 -------- 11/10 ST20 6,9,3 -------- 10/12 ST24 4,7,1
No Leap ---------------------------------------------------------dd/mm Leap 4,7,1
Dec
(06,10) 25/12 ST01 1,7,4
That is it, you have the Ju calendar for the whole year. It will takes 20 minutes to 30 minutes to do, once a year!!!!
Summary
Step 01: Obtains 3 Solstices, beginning Dec Solstice, Jun Solstice, and next Dec Solstice.
Step 02: Convert the 3 Solstices according to the UTC time zone. For China it is UTC+8
Step 03: Calculate the Stem-Branch, and the Sexagesimal Number for date of the 3 Solstices, using the formulas
Sd(yyyy.mmdd) = 365 * (yyyy - 1) + Int((yyyy – 1)/4) – Int((yyyy – 1)/100) + Int((yyyy – 1) /400)
……………………+ Int((367 * mm – 362)/12) + dd + leapcheck
where leapcheck = 0 if mm <= 2
…………………= 1 if mm > 2 and yyyy is a leap year
= 2 otherwise
Day-Stem = (Sd(yyyy.mmdd) + 15) Amod 10
Day-Branch = (Sd(yyyy.mmdd) + 15) Amod 12
SexNo = ((Stem – Branch)/2) Amod 6) * 10 + Stem
Step 04: Find the Top Yuan Stem-Branch for the two Dec Solstices, using the formulas
SexNo / 15 = Q and R (Quotient Q and Remainder R), but when R = 0, R is 15 not 0
Then if R <= 9, the Top Yuan Stem-Branch is Q * 15 + 1
Else Top Yuan Stem-Branch is (Q + 1) * 15 + 1
=> If the two Top Yuan Stem-Branch of the Dec Solstices is different, a Leap Ju occurs.
Step 05: Find the actual Western date of the Top Yuan for the two Dec Solstices
Step 06: From the SexNo of the Top Yuan for two Dec Solstices, and the SexNo of Jun Solstice, find the
Top Yuan Stem-Branch for Jun Solstice. (It help to draw the diagram)
=> Jun Solstice will take the CLOSEST Top Yuan Stem-Branch from the two Dec Solstice.
A = SexNo(1st Dec Solstice’s Top Yuan) – SexNo(Jun Solstice)
B = SexNo(Jun Solstice) – (2nd Dec Solstice’s Top Yuan)
Compare A and B, take the least.
Step 07: Find the actual Western date of the Top Yuan for Jun Solstice.
Step 08: Once all the Western date of the Top Yuan for the Solstices is obtained, fill in the Group-of-4 Table.
The order of the Top Yuan is 1(01,01), 16(6,4), 31(1,7), 46(6,10).
Each Solar Term advances 15 days, that is adding 15 days to the date of the previous Solar Term.
Dec -------------------------------- Feb -------------------------- Apr
(s,b) dd/mm ST01 1,7,4 -------- dd/mm ST05 9,6,3 -------- dd/mm ST09 5,2,8
(s,b) dd/mm ST02 2,8,5 -------- dd/mm ST06 1,7,4 -------- dd/mm ST10 4,1,7
(s,b) dd/mm ST03 3,9,6 -------- dd/mm ST07 3,9,6 -------- dd/mm ST11 5,2,8
(s,b) dd/mm ST04 8,5,2 -------- dd/mm ST08 4,1,7 -------- dd/mm ST12 6,3,9
(s,b) ----------------------------------------------------------------dd/mm Leap 6,3,9
Jun --------------------------------- Aug ------------------------- Oct
(s,b) dd/mm ST13 9,3,6 -------- dd/mm ST17 1,4,7 -------- dd/mm ST21 5,8,2
(s,b) dd/mm ST14 8,2,5 -------- dd/mm ST18 9,3,6 -------- dd/mm ST22 6,9,3
(s,b) dd/mm ST15 7,1,4 -------- dd/mm ST19 7,1,4 -------- dd/mm ST23 5,8,2
(s,b) dd/mm ST16 2,5,8 -------- dd/mm ST20 6,9,3 -------- dd/mm ST24 4,7,1
(s,b) ----------------------------------------------------------------dd/mm Leap 4,7,1
Dec
(s,b) dd/mm ST01 1,7,4
That’s Folks.
Please do not hesitate to correct me if I make any mistake. Thank You.
[/quote]
Can read the whole thing(the other conversation in there are also very interesting) in here:
https://web.archive.org/web/20130918110413/http://www.fivearts.net/index.php/topic,4768.0.htmlIn the future plan to repost 100 stems translations from there and maybe the fisherman song as well, as we do need more QMDJ topics in my view. Enjoy. : )