Formula for converting Western years to Chinese years

  • Context: Undergrad 
  • Thread starter Thread starter larashka
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 2K views
larashka
Messages
3
Reaction score
0
Hi, I need some help understanding a formula I found on a website to convert the Western calendar to the Chinese one. I'm looking for anyone who can explain it to me in simple terms with clear examples. Any help at all would be much appreciated.

The relevant section from the website is pasted below but I have also included the link for more information.

Thanks in advance,
Belinda

--
For converting Western years into Chinese, for any positive integers x and y, let rem(x,y) denote the remainder on dividing x by y (i.e., rem(x,y) = x mod y). Then given a Western year n, the Chinese year (e,a,k) may be determined as follows: Let i*=*rem(n+6,10) if n is even, rem(n+6,10) - 1 otherwise. Then e = ½*i. (Note that rem(n+6,10) is simply the last digit of n+6.) a*=*rem(n+8,12), and k*is the largest integer k' such that 60k' <= n + 2756 (provided that n >= -2696). Having determined e and a by these means, the element name and the animal name are obtained from the above correspondence.
--
URL: http://www.hermetic.ch/cal_stud/ch_year.htm
 
Last edited:
Mathematics news on Phys.org
Let n=1994
Then i=rem(2000,10)=0
e=1/2*0=0
a=rem(2002,12) =10 (166*12=1992)
k<=(1994+2756)/60=79,...
so k=79

We have then Chinese year (0,10,79)

If this was a bit too quick for you, post again.
 
Thanks Arildno, but I'm still at little unclear. I understand k and e but the rem() function in a and i is totally over my head.
 
I guess what you want is an easy way to understand how to calculate the remainder function.
Now given x>y, you shall first find the largest integer n so that y*n<=x
How to do that?
Simply calculate x/y, and throw away the decimals after the point; there you have n!

Now, the remainder is given by x-n*y
 
It's also the same remainder you always got when you used to do long division in elementary school.

cookiemonster
 
Thanks that's great, but could you tell me what are x and y in relation to the rest of the whole? For example, n = western year