Android 4.2 bug doesn’t recognise December
Android Police has spotted an intriguing flaw in the latest Android 4.2 system – it doesn’t recognise the month of December.
The People calendar app goes straight from November to January, yet the Calendar itself remains unaffected.
The issue was raised initially on the Android Open Handset Alliance Project, where the complainant, Rohit Naik, noted: “Today I was inserting birthday of a friend in my contact list so that I can sync the birthdays in my calendar. I noticed that the December month is missing.
“When I pressed ‘new event’ the calendar came but it was not having the option for the month December,” he added.
The explanation for this bug appears later in the thread. The difference comes about from setting the month references in the code differently to the months themselves.
The month references start off 0, 1, 2, and goes up to 11, whereas the months go from 1 to 12 inclusive – in other words an “off by 1” bug.
And as the DatePicker.java sets the maximum value to 12, the string is only 12 entries long and the reference starts at 0, it will end at 11 – knocking off the 12th month, December.
“As a coder, I have encountered similar issues. You have to account for the computer using 0 as the first number and correctly adjust accordingly,” notes a further contributor.
It’s safe to presume that there will be a bug fix for Android 4.2.1 following this relatively minor error, and as a result a swift rollout of an updated OS.
Yet for the time being the smart comments have already started, ranging from speculation that Google has bought December 2012 to stop the sale of iDevices in the Christmas market, to Android skipping December to avoid the ‘end of the world’ prophecy on December 21 popularised by the Mayan calendar.
- » Google Play Protect fails AV-Comparatives' anti-malware test
- » Play Store developers can now add keywords to their apps for greater discovery
- » Dropbox explains the downsides of sharing iOS and Android code
- » Huawei unveils HarmonyOS as more than just an Android replacement
- » DRM system Denuvo is coming to Android as ‘Mobile Game Protection’