Under the Ritsuryo system (a system of centralized government based on the ritsuryo code), the task of preparing the calendar based on the observations of the sun and moon was carried out by the Onmyoryo (a government office that had jurisdiction over calendar preparation, astronomy, divination, etc.) instead of the Daigaku-ryo (the Bureau of Education under the ritsuryo system).
律令制においては、大学寮ではなくて陰陽寮の管轄とされ、太陽・月を観測して暦を作成することが規定された。