Xuanming calendar

The Xuanming calendar (宣明历), also known as Senmyō-reki or Senmei-reki in its Japanese version, was a Chinese lunisolar calendar. It was used in China during the 9th century as well as in the Koryo kingdom in Korea; in Japan it remained in use from the late-9th century to the late-17th century. In China, the Xuanming calendar was the penultimate calendar to be used in the Tang dynasty. In 893, it was replaced by the Chongxuan calendar (崇玄曆), which was used to the end of the Tang dynasty and beyond.

China
The Xuanming calendar was one of several calendars developed during the Tang dynasty. It was implemented in 822 and was used until 892, a period of 71 years. In 893, it was replaced by the Chongxuan calendar (崇玄曆), which was used to the end of the Tang dynasty and into the subsequent Five Dynasties and Ten Kingdoms period.

Japan
The calendar was imported into Japan in 859. The earliest record of this calendar being used in Japan is in the 8th month of the 3rd year of Jōgan (861) during the reign of the Emperor Seiwa. It would continue to be used until 1685, after which it would be superseded by the Jōkyō calendar, the first calendar developed specifically for Japan; by that point the calendar was in error by about two days.