Chinese calendar by mountain peoples. After Qin Shi Huang unified China under the Qin dynasty in 221 BC, the Qin calendar () was introduced. It followed most of the rules governing the Zhuanxu calendar, but the month order was that of the Xia calendar; the year began with month 10 and ended with month 9, analogous to a Gregorian calendar beginning in October and ending in September. The intercalary month, known as the second "Jiǔyuè" (), was placed at the end of the year. The Qin calendar was used into the Han dynasty. Emperor Wu of Han introduced reforms halfway through his
Gregorian calendar always obtained by doubling (the "bissextum" (twice sixth) or bissextile day) until the late Middle Ages. The Gregorian calendar is proleptic before 1582 (assumed to exist before 1582). The following equation gives the number of days (actually, dates) that the Gregorian calendar is ahead of the Julian calendar, called the "secular difference" between the two calendars. A negative difference means the Julian calendar is ahead of the Gregorian calendar. where formula_2 is the secular difference and formula_3 is the year using astronomical year numbering, that is, use for BC years. formula_4 means that if the result of the division is