The Rumi calendar (رومی تقویم, Rumi takvim, lit. "Roman calendar"), a specific calendar based on the Julian calendar, was officially used by the Ottoman Empire after Tanzimat (1839) and by its successor, the Republic of Turkey until 1926. It was adopted for civic matters and is a solar based calendar, assigning a date to each solar day. In the Islamic state of the Ottoman Empire, the religious Islamic calendar was in use, within which days are numbered within each lunar phase cycle. Because the length of the lunar month is not an even fraction of the length of the tropical year, a purely lunar calendar quickly drifts relative to the seasons. In 1677, Head Treasurer (باش دفتردار, Baş Defterdar) Hasan Pasha under Sultan Mehmed IV proposed the correction of financial records by dropping one year (an escape year) every 33 years, resulting from the difference between the lunar Islamic calendar and the solar Julian calendar. In 1740 (1152 AH) during the reign of Sultan Mahmud I, March was adopted as the first month of the fiscal year for the payment of taxes and dealings with government officials instead of Muharram following Treasurer Atıf Efendi's proposal. Proposed by Treasurer Moralı Osman Efendi during the reign of Sultan Abdul Hamid I, the range of the fiscal calendar applications was extended in 1794 to state expenditures and payments in order to prevent surplus cost arising from the time difference between the Islamic and Julian calendar. The Julian calendar, used from 1677 AD on for fiscal matters only, was adopted on March 13, 1840 AD (March 1, 1256 AH), in the frame of Tanzimat reforms shortly after the accession to the throne of Sultan Abdülmecid I, as the official calendar for all civic matters and named "Rumi calendar" (literally Roman calendar). The counting of years began with the year 622 AD, when Muhammad and his followers emigrated from Mecca to Medina, the same event marking the start of the Islamic calendar. The months and days of the Julian calendar were used, the year starting in March.