A good reference for this is:
Science and Civilization in
Needham has a good section on Chinese Astronomy,pg 171-461
The section: The Origin of the system of the Hsiu explains how the calendar worked.
Then on page 258/259 he writes:
Then a thousand years later, when
the Jesuits reached
There are about eight footnotes to this paragraph.
My interest in Chinese scientific history, is of course, to discover how much the Chinese learned from the Nabataean merchants that visited them, and how much the Nabataeans learned and took back to Arabia with them.