Calendars are based on "natural" cycles—the year for the solar calendar, the month and week for the lunar calendar—or "artificial" ones, such as the sixty-day cycle of the Chinese year\. (\ The asterisk refers to the glossary at the end of the article.)
Livy reports that as early as the beginning of the 7th century BCE, Numa Pompilius, Romulus's successor, had established an approximate common multiple of the orbital periods of the Earth and the Moon, known as the Metonic cycle (5th century BCE). It corresponds to nineteen tropical years or 235 synodic months\, or 6,940 days.
The importance Chinese emperors placed on astrologers/astronomers is well known. In their calculations, they may have had to consider problems such as: "When will the summer solstice coincide with a full moon if it is fifteen days until the solstice and seven days until the full moon?" The question is then to find an integer x whose remainder upon division by 365 is 15 and whose remainder upon division by 28 is 7. This is the congruence problem addressed by the Chinese remainder theorem.