The Chinese had adopted a 365 1/4 day solar calendar and a 29 1/2 day lunar calendar by 1400BCE IIRC.
Two oracle bones Shang Dynasty in China (c. 1800 - 1200 BCE) Evidence from the Shang oracle bone inscriptions shows that at least by the 14th century BC the Shang Chinese had established the solar year at 365 1/4 days and lunation at 29 1/2 days. In the calendar that the Shang used, the seasons of the year and the phases of the Moon were all supposedly accounted for.
A year has always been measuered as an the approximate time the earth takes to complete it journey around the sun the same way a day has been measured as the approximate tie the earth takes to complete a revolution on its axis.
It may interest you to know that prior to the 16th century, virtually no one believed that earth rotates and orbits the sun.