News for hackers. Stuff that matters.
Re:Android 4.2: December month missing in calendar by erydo on Saturday November 17, 2012 @07:29PM (#4799437)
According to this comment: https://code.google.com/p/android/issues/detail?id=39692#c17

It's caused by the convention of the Android datepicker to store month values as 0-11 instead of 1-12.

Dates are given in 1-31 as expected; and years are given in e.g. 2012 as expected; but months are given in 0-11 which is totally inconsistent with how people normally number months and how the rest of the API works.

So for January 1st, 2012, printing 'getDate()', 'getMonth()', and 'getYear()' would yield '1-0-2012'. It's a badly designed API and I'm surprised there aren't more instances of this breaking.

(I ran into this once in our codebase, but we managed to fix it pretty quickly).

Re:Android 4.2: December month missing in calendar by trimbo on Saturday November 17, 2012 @07:37PM (#4799447)
> months are given in 0-11 which is totally inconsistent with how people normally number months and how the rest of the API works

That numbering is consistent with Java and the constants in the Android API.

http://docs.oracle.com/javase/1.4.2/docs/api/constant-values...

http://developer.android.com/reference/java/util/Calendar.ht...

Re:Android 4.2: December month missing in calendar by erydo on Saturday November 17, 2012 @07:43PM (#4799457)
You're right, and I didn't doubt that. I meant it's self-inconsistent with how days and years are handled, not necessarily inconsistent with other calendar APIs within Java and Android. Sorry I wasn't clear.
Re:Android 4.2: December month missing in calendar by solarexplorer on Saturday November 17, 2012 @10:11PM (#4799700)
I guess the idea is to use the month as an array index to convert it into a string. You don't usually convert the day of month or the year into a string.

Nontheless I agree that it's bad API design.

Re:Android 4.2: December month missing in calendar by pwg on Sunday November 18, 2012 @10:15AM (#4800686)
Then declare the array with 13 slots, fill slots 1-12 with the appropriate strings, and don't use slot 0. Or better, put in an error check for being passed a zero.

Suddenly, a 1-12 value for "month" is directly an index into an array to convert the number into a string...

Re:Android 4.2: December month missing in calendar by mappu on Saturday November 17, 2012 @08:01PM (#4799502)
Javascript is the same. On 2012-11-18;

    >> (new Date()).getMonth();
    10
but getFullYear() and getDate() give 2012 and 18 as expected.
Re:Android 4.2: December month missing in calendar by king_jester on Saturday November 17, 2012 @09:44PM (#4799662)
The Java calendar and date APIs are the worst for this and several other design flaws that come back to bite you. There's a reason why JodaTime (http://joda-time.sourceforge.net/) is so popular.
Re:Android 4.2: December month missing in calendar by ajross on Saturday November 17, 2012 @10:28PM (#4799732)
All calendrics APIs will bite you. It's not a property of the API (though I agree Java's is bad) but of the problem domain. The gregorian calendar is simply a mess, and any API on that is just a facade on the mess. Never trust your calendar API. Never fool yourself into thinking you've found the right one. Always be very, very afraid when you find yourself doing arithmetic on a "date".
Re:Android 4.2: December month missing in calendar by sk5t on Sunday November 18, 2012 @12:59AM (#4799996)
Right on... Jon Skeet offers a very fine article on the slipperyness of date-time arithmetic here (it's about .NET and Noda Time, but the same issues apply): http://noda-time.blogspot.com/2011/08/what-wrong-with-dateti...
Re:Android 4.2: December month missing in calendar by moondowner on Saturday November 17, 2012 @06:06PM (#4799257)
Note for everyone checking only the screenshots and not reading all the comments. The Calendar app is fine, the People app has this problem.

"It's only broken in the People app (like #29 said, Calendar is fine).

I'm running JOP40C, and I can confirm this bug (in the People app) with all date formats."

Re:Android 4.2: December month missing in calendar by Achshar on Sunday November 18, 2012 @05:36AM (#4800355)
#29 seems to be missing. I didn't know comments can be deleted on that site.
Re:Android 4.2: December month missing in calendar by nemof on Saturday November 17, 2012 @05:57PM (#4799233)
I wonder if there's been any movement on the dreadful performance of 4.2? It made me very aware that there is little to no support for Android/Nexus, and nowhere to take problems unless you know what a bug tracker is, which many will not.
Re:Android 4.2: December month missing in calendar by talleyrand on Saturday November 17, 2012 @06:54PM (#4799364)
I've noticed the exact same thing. 4.2 has ground my Nexus 7 to a halt. Turned off NFC, which helped a lot, but it's still not as snappy as 4.1
Re:Android 4.2: December month missing in calendar by yohui on Saturday November 17, 2012 @08:00PM (#4799497)
That's curious. 8 or 16GB? I haven't run into it myself, but I've heard that low free space will slow down the Nexus 7.

Stuff like better animations for the app switcher made my own Nexus 7 feel faster after the 4.2 update. Of course, that's just a perceptual change.

Prior to 4.2, Chrome with many tabs open and Adobe Reader were my only major annoyances. Chrome seems somewhat better, though since I've cut down on tab usage and started using Firefox more I'm not sure how much it's really improved. As for Reader, I just use ezPDF for larger documents now.

Re:Android 4.2: December month missing in calendar by talleyrand on Sunday November 18, 2012 @07:51AM (#4800492)
8G with plenty of free space.
Re:Android 4.2: December month missing in calendar by habosa on Sunday November 18, 2012 @01:11AM (#4800021)
I've read it has to do with multi account and root.
Re:Android 4.2: December month missing in calendar by mgcross on Saturday November 17, 2012 @06:27PM (#4799312)
The lag can be unbearable at times. Makes my HP touchpad running CM feel fast. I've had some luck shutting down processes in Settings->Apps. An XDA member reported that his performance and battery life improved after cycling the battery a couple of times.
Re:Android 4.2: December month missing in calendar by auxbuss on Sunday November 18, 2012 @07:02AM (#4800431)
Yes, 4.2 has far worse performance than prior releases. It's taken the shine off of an otherwise excellent piece of kit.

It's also disappointing that some longstanding Chrome issues have not been fixed.

If the option were available to go back, I would take it.

Re:Android 4.2: December month missing in calendar by mun2mun on Sunday November 18, 2012 @12:10AM (#4799908)
Blame the reviewers for not focusing it. Also this is why I stopped being an early adopter.
Re:Android 4.2: December month missing in calendar by javis on Saturday November 17, 2012 @05:33PM (#4799173)
Wow. I was just feeling pretty stupid about some of the bugs in my code. Thanks for the pick-me-up, Google.
Re:Android 4.2: December month missing in calendar by AYBABTME on Saturday November 17, 2012 @06:12PM (#4799272)
Thanks to Google, there shall be no 12-12-2012 apocalypse.
Re:Android 4.2: December month missing in calendar by cmelbye on Saturday November 17, 2012 @11:30PM (#4799839)
12-21
Re:Android 4.2: December month missing in calendar by chmod775 on Saturday November 17, 2012 @05:14PM (#4799132)
Incoming iOS advert: "Supports all months, January to December"
Re:Android 4.2: December month missing in calendar by meepmorp on Saturday November 17, 2012 @05:48PM (#4799200)
This would never have been released Steve Jobs was still alive.
Re:Android 4.2: December month missing in calendar by AYBABTME on Saturday November 17, 2012 @06:03PM (#4799255)
Indeed, he would have called Eric Schmidt to let him know about this Android bug before it being released.
Re:Android 4.2: December month missing in calendar by olgeni on Saturday November 17, 2012 @05:54PM (#4799220)
Perhaps Google thought it was a good idea to insert a leap month to check how the kernel would behave.

Did anybody notice heavy CPU load?

Re:Android 4.2: December month missing in calendar by teeja on Saturday November 17, 2012 @11:12PM (#4799811)
Anybody who's never made a mistake with zero-indexed arrays, raise your hand!
Re:Android 4.2: December month missing in calendar by arcatek on Sunday November 18, 2012 @12:53AM (#4799991)
_o_
Re:Android 4.2: December month missing in calendar by rickylais on Saturday November 17, 2012 @05:07PM (#4799123)
Looks like we will be seeing Android 4.2.1 very soon
Re:Android 4.2: December month missing in calendar by cjarl on Saturday November 17, 2012 @05:23PM (#4799150)
Can't the People app be updated through the Play Store like Gmail?
Re:Android 4.2: December month missing in calendar by rickylais on Saturday November 17, 2012 @05:44PM (#4799193)
I don't think so.
Re:Android 4.2: December month missing in calendar by drivebyacct2 on Sunday November 18, 2012 @12:40AM (#4799970)
Yes. It could.
Re:Android 4.2: December month missing in calendar by harrylove on Saturday November 17, 2012 @11:16PM (#4799820)
Someone call Nick Bostrom and let him know we have a test to discover if we're living inside Android 4.2. Results pending.
Re:Android 4.2: December month missing in calendar by csense on Saturday November 17, 2012 @07:18PM (#4799408)
It's rather ironic that a company so high-tech it's looking hard at self-driving cars and asteroid mining has trouble implementing a calendar, a technology that's been around for thousands of years...
Re:Android 4.2: December month missing in calendar by seiji on Saturday November 17, 2012 @07:25PM (#4799426)
It's almost as if a company is comprised of thousands of individual minds and abilities and priorities instead of one laser focused brilliance.
Re:Android 4.2: December month missing in calendar by benatkin on Saturday November 17, 2012 @11:38PM (#4799852)
You've made a good point. It's not as if built-in Android apps aren't important to Google, or they don't have a release process. I think heads will roll over this.
Re:Android 4.2: December month missing in calendar by mememememememe on Sunday November 18, 2012 @02:34AM (#4800160)
just people they are so technical savvy doesn't mean they don't make mistakes. tests aren't perfect. you can't spend every day to write all corner cases. i don't consider that as ironic. i consider it as normal. users are so willing to help the software moving. that's the spirit of android software being open-source. we can find such small bug quickly and the engineers can fix this bug soon.
Re:Android 4.2: December month missing in calendar by Evbn on Saturday November 17, 2012 @09:49PM (#4799668)
The cars crash sometimes too. Software has bugs.
Re:Android 4.2: December month missing in calendar by kaolinite on Sunday November 18, 2012 @07:30AM (#4800462)
Have they? I thought the only crash was when a person in a car crashed into the back of one? (pretty sure the self-driving car was being driven by a person at that point too).
Re:Android 4.2: December month missing in calendar by ceejayoz on Sunday November 18, 2012 @12:52PM (#4801041)
That statement will almost certainly be true at some point, but thus far my understanding is Google's self-driving cars have not caused an accident yet.
Re:Android 4.2: December month missing in calendar by pfortuny on Sunday November 18, 2012 @04:44AM (#4800302)
I wonder what the git blame command will contain...