Flare Sci-fi Forums
Flare Sci-Fi Forums Post New Topic  New Poll  Post A Reply
my profile | directory login | search | faq | forum home

  next oldest topic   next newest topic
» Flare Sci-Fi Forums » Community » Officers' Lounge » Gregorian Calander to Chinese Lunar Calender

   
Author Topic: Gregorian Calander to Chinese Lunar Calender
Saltah'na
Chinese Canadian, or 75% Commie Bastard.
Member # 33

 - posted      Profile for Saltah'na     Send New Private Message       Edit/Delete Post   Reply With Quote 
A friend of mine is doing a large project for university. One aspect of this project is a switch between Gregorian and Chinese New Year Calenders.

The only problem is that there is no definite formula to switch between Chinese and Gregorian dates. We all know that Gregorian calendars have 12 months with the second month having 29 days during so called "leap years". The Chinese calender usually has 12 months each with around 25 days. Some Chinese years have 13 months.

Does anyone know of any program that will do this?

--------------------
"And slowly, you come to realize, it's all as it should be, you can only do so much. If you're game enough, you could place your trust in me. For the love of life, there's a tradeoff, we could lose it all but we'll go down fighting...." - David Sylvian
FreeSpace 2, the greatest space sim of all time, now remastered!

Registered: Mar 1999  |  IP: Logged
Ritten
A Terrible & Sick leek
Member # 417

 - posted      Profile for Ritten     Send New Private Message       Edit/Delete Post   Reply With Quote 
Cheat, line them up accordingly in a spreadsheet, this will give you a conversion, even when there is a formula to use, then have a nice little script search it for the proper line.

--------------------
"You are a terrible human, Ritten." Magnus
"Urgh, you are a sick sick person..." Austin Powers
A leek too, pretty much a negi.....

Registered: Sep 2000  |  IP: Logged
TSN
I'm... from Earth.
Member # 31

 - posted      Profile for TSN     Send New Private Message       Edit/Delete Post   Reply With Quote 
That would only work if both years always have the same number of days.
Registered: Mar 1999  |  IP: Logged
Saltah'na
Chinese Canadian, or 75% Commie Bastard.
Member # 33

 - posted      Profile for Saltah'na     Send New Private Message       Edit/Delete Post   Reply With Quote 
The thing is, my friend wants to use it for ALL dates, not just present day. So if a person wants to check what the Chinese Lunar date is for May 21, 146 AD, well, you get the idea.

And no, Chinese years do NOT have the same amount of days than the Gregorian calendar.

--------------------
"And slowly, you come to realize, it's all as it should be, you can only do so much. If you're game enough, you could place your trust in me. For the love of life, there's a tradeoff, we could lose it all but we'll go down fighting...." - David Sylvian
FreeSpace 2, the greatest space sim of all time, now remastered!

Registered: Mar 1999  |  IP: Logged
Omega
Some other beginning's end
Member # 91

 - posted      Profile for Omega     Send New Private Message       Edit/Delete Post   Reply With Quote 
If you line up a few thousand days by what numerical day of the year you're working with, then you might be able to use Excel to find a best-fit line. That'll be your formula to tell you what the result should be for any other day of the year. Just convert the result into whatever calendar system you want to play with.

Mind you, that's vastly oversimplifying, but I think it'll work in principle.

--------------------
"This is why you people think I'm so unknowable. You don't listen!"
- God, "God, the Devil and Bob"

Registered: Mar 1999  |  IP: Logged
Siegfried
Fullmetal Pompatus
Member # 29

 - posted      Profile for Siegfried     Send New Private Message       Edit/Delete Post   Reply With Quote 
How about working this out by first finding patterns? The patterns for leap years is pretty easy: years evenly divisible by 4 are leap years, with the exception of centurial years that are not evenly divisible by 400 (cite). This site gives a bit of information about the Chinese lunar calendar, but there's a lot of astronomy in the determination of it. It might be worth it to just find an almanac or something that gives the length of the years for a couple millennia or so. See if you can find a pattern that way.

After that, I imagine it would be relatively okay to try and work out how the Gregorian and Chinese lunar calenders progress in relation to each other.

Then there's this, but I'm loath to trust a site that uses pink and pastel blue on it.

--------------------
The philosopher's stone. Those who possess it are no longer bound by the laws of equivalent exchange in alchemy. They gain without sacrifice and create without equal exchange. We searched for it, and we found it.

Registered: Mar 1999  |  IP: Logged
Saltah'na
Chinese Canadian, or 75% Commie Bastard.
Member # 33

 - posted      Profile for Saltah'na     Send New Private Message       Edit/Delete Post   Reply With Quote 
I saw that site. Now if only I could get the code to it.

--------------------
"And slowly, you come to realize, it's all as it should be, you can only do so much. If you're game enough, you could place your trust in me. For the love of life, there's a tradeoff, we could lose it all but we'll go down fighting...." - David Sylvian
FreeSpace 2, the greatest space sim of all time, now remastered!

Registered: Mar 1999  |  IP: Logged
TheWoozle
Active Member
Member # 929

 - posted      Profile for TheWoozle     Send New Private Message       Edit/Delete Post   Reply With Quote 
The big problem is that the two systems are innacurate and have a lot of arbitrary human decisions in them. Gonna have to keep a lot of data.

--------------------
joH'a' 'oH wIj DevwI' jIH DIchDaq Hutlh pagh
(some days it's just not worth chewing through the leather straps in the morning)
The Woozle!

Registered: Nov 2002  |  IP: Logged
   

Quick Reply
Message:

HTML is enabled.
UBB Code™ is enabled.

Instant Graemlins
   


Post New Topic  New Poll  Post A Reply Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


© 1999-2024 Charles Capps

Powered by UBB.classic™ 6.7.3