Posthumous, temple, and era names From the Shang to Sui (581–618 AD) dynasties, Chinese rulers (both kings and emperors) were referred to by their posthumous names in records and historical texts. Temple names, first used during the reign of Emperor Jing of Han (r. 157–141 BC), were used exclusively in later records and historical texts when referring to emperors who reigned during the Tang (618–907 AD), Song (960–1279 AD), and Yuan (1271–1368 AD) dynasties. During the Ming (1368–1644 AD) and Qing (1644–1911 AD) dynasties, a single era name was used for each emperor's reign and became the preferred way to refer to Ming and Qing emperors in historical texts. Use of the era name was formally adopted during the reign of Emperor Wu of Han (r. 141–87 BC), yet its origins can be traced back further. The oldest method of recording years—which had existed since the Shang—set the first year of a ruler's reign as year one. When an emperor died, the first year of a new reign period would begin. This system was changed by the 4th century BC when the first year of a new reign period did not begin until the first day of the lunar New Year following a ruler's death. When Duke Huiwen of Qin assumed the title of king in 324 BC, he changed the year count of his reign back to the first year. For his newly adopted calendar established in 163 BC, Emperor Wen of Han (r. 180–157 BC) also set the year count of his reign back to the beginning. Since six was considered a lucky number, Han Emperors Jing and Wu changed the year count of their reigns back to the beginning every six years. Since every six-year period was successively marked as yuannian (元年), eryuan (二元), sanyuan (三元), and so forth, this system was considered too cumbersome by the time it reached the fifth cycle wuyuan sannian (五元三年) in 114 BC. In that year a government official suggested that the Han court retrospectively rename every "beginning" with new characters, a reform Emperor Wu accepted in 110 BC. Since Emperor Wu had just performed the religious feng (封) sacrifice at Mount Taishan, he named the new era yuanfeng (元封). This event is regarded as the formal establishment of era names in Chinese history. Emperor Wu changed the era name once more when he established the 'Great Beginning' (太初 Taichu) calendar