1840 followed by 1841
1840 (MDCCCXL) was a leap year starting on Wednesday of the Gregorian calendar and a leap year starting on Monday of the Julian calendar, the 1840th year of the Common Era (CE) and Anno Domini (AD) designations, the 840th  year of the 2nd millennium, the 40th  year of the 19th century, and the  1st   year of the 1840s decade. As of the start of 1840, the Gregorian calendar was 12 days ahead of the Julian calendar, which remained in localized use until 1923.