11-29-2012 02:30 PM
Trying to intergrate the new calendar goodness into my BB10 application.
= (.() + .() + .() + .(), .() + .(), .() + .(), .() + .(), .() + .(), );
The remote debugger then shows the date:
Sat 29 Dec 19:30:00
This is incorrect, the date I am expecting is Thursday 29th November 19:30:00.
Secondly, the operation where the date is added to the calendar returns error code 20 on the Dev Alpha.
Does anyone know where there is a list of error codes for BlackBerry 10 Development and WebWorks or what this one means - is it permissions based?
Solved! Go to Solution.
11-29-2012 03:25 PM
Okay, solved 1 problem. It was a permissions issue, was missing the <rimermissions> start and close tags.
Still be nice to know if there is a list of these cryptic error codes though. Also the date problem remains.
11-29-2012 03:36 PM
11-29-2012 03:46 PM - edited 11-29-2012 03:50 PM
Oh okay, appologies for that - didn't realise that is specific for months. Seems a bit odd to me personally, given that days do obviously start with 1. I'm assuming there is some clever reason why the months are 0-11, but what an annoying pitfall to run into.
Thanks for your help!
11-29-2012 04:08 PM
No problem, glad to help. I'll just add some examples here:
var d = new Date("2012 11 29");does not give the same output as
var d = new Date("2012", "11", "29");If each parameter (y,m,d) is passed separately, they are interpreted as integer values (starting from index 0). You can test it out like this:
var a = new Date("2012 November 10"); a.getMonth(); // the output is: 10 var b = new Date("2012 December 10"); b.getMonth(); // the output is: 11