According to legend, the Chinese calendar developed during the third millennium BC. It is said to have been invented by the first legendary ruler, Huang Di or the Yellow Emperor, who reigned, by tradition, c.2698-2599 BC. The fourth legendary ruler, Emperor Yao, added the intercalary month. The 60-year "stem-branch" cycle was first used to mark years during the first century BC. Tradition fixes the first year of the first cycle (the epoch) at 2637 BC. Thus the cycle beginning in 1984 is the 78th. Other opinions fix the first year at 2697 BC (while Huangdi was still immature), by which count we are now in cycle 79.
The earliest archaeological evidence of the Chinese calendar appears on oracle bones of the late second millennium BC Shang dynasty. They show a 12-month lunisolar year having an occasional thirteenth month, and even a fourteenth month. Adding extra months to a calendar year is known as intercalation, and keeps the new year from drifting backwards through the seasons, just as the Gregorian calendar puts an extra day in February every four years.
Historical dates have been exactly determinable since 841 BC, the early Zhou dynasty. It is known that in this period the calendar used arbitrary intercalations. The first month of its year was near the winter solstice and the intercalary month was after the twelfth month. The stifen (quarter remainder) calendar, which began about 484 BC, was the first calculated Chinese calendar, so named because it used a solar year of 365¼ days, along with a 19-year (235-month) Rule Cycle, known in the West as the Metonic cycle. The winter solstice was in its first month and its intercalary month was inserted after the twelfth month.
Beginning in 256 BC, it was first used by the Qin state, then the whole country after the Qin took over the whole country and became the Qin dynasty. In this calendar, the intercalary month was an extra ninth month at the end of a year that began with the tenth month, now placing the winter solstice in the eleventh month. This calendar continued to be used during the first half of the Western Han Dynasty.
Read more Wikipedia