February 29 is a date that occurs only every four years, and is called leap day. This day is added to the calendar in leap years as a corrective measure, because the earth does not orbit around the sun in precisely 365.000 days.
The Gregorian calendar is a modification of the Julian calendar first used by the Romans. The Roman calendar originated as a lunisolar calendar and named many of its days after the syzygies of the moon: the new moon (Kalendae or calends, hence “calendar”) and the full moon (Idus or ides). The Nonae or nones was not the first quarter moon but was exactly one nundinae or Roman market week of nine days before the ides, inclusively counting the ides as the first of those nine days. In 1825, Ideler believed that the lunisolar calendar was abandoned about 450 BC by the decemvirs, who implemented the Roman Republican calendar, used until 46 BC. The days of these calendars were counted down (inclusively) to the next named day, so 24 February was ante diem sextum Kalendas Martii (“the sixth day before the calends of March”) often abbreviated a. d. VI Kal. Mar. The Romans counted days inclusively in their calendars, so this was actually the fifth day before March 1 when counted in the modern exclusive manner (not including the starting day).
The Republican calendar’s intercalary month was inserted on the first or second day after the Terminalia (a. d. VII Kal. Mar., February 23). The remaining days of Februarius were dropped. This intercalary month, named Intercalaris or Mercedonius, contained 27 days. The religious festivals that were normally celebrated in the last five days of February were moved to the last five days of Intercalaris. Because only 22 or 23 days were effectively added, not a full lunation, the calends and ides of the Roman Republican calendar were no longer associated with the new moon and full moon.
The Julian calendar, which was developed in 46 BC by Julius Caesar, and became effective in 45 BC, distributed an extra ten days among the months of the Roman Republican calendar. Caesar also replaced the intercalary month by a single intercalary day, located where the intercalary month used to be. To create the intercalary day, the existing ante diem sextum Kalendas Martii (February 24) was doubled, producing ante diem bis sextum Kalendas Martii. Hence, the year containing the doubled day was a bissextile (bis sextum, “twice sixth”) year. For legal purposes, the two days of the bis sextum were considered to be a single day, with the second half being intercalated, but common practice by 238, when Censorinus wrote, was that the intercalary day was followed by the last five days of February, a. d. VI, V, IV, III and pridie Kal. Mar. (which would be those days numbered 24, 25, 26, 27, and 28 from the beginning of February in a common year), i.e. the intercalated day was the first half of the doubled day. All later writers, including Macrobius about 430, Bede in 725, and other medieval computists (calculators of Easter), continued to state that the bissextum (bissextile day) occurred before the last five days of February.
Until 1970, the Roman Catholic Church always celebrated the feast of Saint Matthias on a. d. VI Kal. Mar., so if the days were numbered from the beginning of the month, it was named February 24 in common years, but the presence of the bissextum in a bissextile year immediately before a. d. VI Kal. Mar. shifted the latter day to February 25 in leap years, with the Vigil of St. Matthias shifting from February 23 to the leap day of February 24. Other feasts normally falling on February 25–28 in common years are also shifted to the following day in a leap year (although they would be on the same day according to the Roman notation). The practice is still observed by those who use the older calendars.