# Bugs in the iOS calendar app

Stand-up mathematician1 Matt Parker found some interesting bugs in the iOS calendar app:

I encourage you to watch the video, but the short summary is that if you scroll back far enough (centuries) in the year view of the iOS Calendar app, the year labels and some months disappear. I reproduced this bug on my iPhone:

I don’t really believe Parker’s suggested explanation for this bug, although to be fair, I don’t think he really does, either. It should be noted that 1582 (the year where my iPhone first shows this problem) is the year that the Gregorian calendar was introduced.2

Speaking of the Gregorian calendar, while trying to reproduce Parker’s bug, I found another bug. Check out the year view for 1900:

Notice two things:

• February is shown as having 29 days.
• March 1 and the nonexistent February 29 are both shown as being Thursdays.

When you zoom in to February 1900, it shows that month correctly as having only 28 days.3

However, the year view for 2100 shows the correct number of days for February 2100.

In terms of severity, these bugs are extremely minor. Very few people are using their iPhones to view calendar events in the 16th century, or indeed probably before the 1990s.

1. Coolest job description EVER! [return]
2. Although different countries adopted the Gregorian calendar in different years.

For example, Great Britain and its colonies adopted the Gregorian calendar in September 1752, by skipping 11 days of that month. You can see this in many versions of the Unix cal command-line utility, including the one on my MacBook:

  Christophers-MacBook-Pro:~ chris\$ cal 9 1752
September 1752
Su Mo Tu We Th Fr Sa
1  2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

[return]
3. If you are feeling confused, remember that in the Gregorian calendar years that are divisible by 100 are not leap years, unless they are also divisible by 400. For example, 1800 and 1900 were not leap years, 2100 will not be a leap year, but 2000 was a leap year. The means if you were born in the 20th century, every year divisible by 4 in your lifetime will probably be a leap year, just like it would have been under the previous Julian calendar. [return]