chrisphan.com

Bugs in the iOS calendar app

An analog clock reading 2:582020-04-06 / 2020-W15-1T14:58:00-05:00 / 0x5e8b89c8

Categories: uncategorized

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:

Screenshot of iOS
calendar app, showing the year view for the year 1582. Several months are
missing.
My iPhone's calendar app year view for 1582 is messed up.

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:

Screenshot of iOS
calendar app, showing the year view for the year 1900. February has 29 days, the
last of which is the same day of the week as the first of March.
My iPhone's calendar app year view for 1900

Notice two things:

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

Screenshot of iOS
calendar app, showing the month view for the February 1900, with 28 days.
My iPhone's calendar app month view for February 1900

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

Screenshot of iOS
calendar app, showing the year view for the year 2100.
My iPhone's calendar app year view for 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!

  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
    
  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.