Using Platform Services 1.0 to retrieve calendar entries I found that calendar entries that retrieved with GetList(criteria) calendar service function have a serious problem:
the StartTime property and probably EndTime property of every calendar entry is NOT a Date object as mentioned in Platform Services API reference (Web Developer's Library 1.10), but a simple string, same if you use Date.toString() function!!
I found a workaround but it's working ONLY if your device language is English!!:
You can create a new Date object using:
var aDateobj = new Date(calEntry.StartTime);
The Date object constructor fortunately can parse this string and create a useful Date object.
BUT if your device have any other language except English then the StartTime string is localized in the selected device language and then Date constructor parser DOES NOT recognize the date string!!!
This resulted in a NaN value in every case!
So Calendar service is almost complete useless for every device without english language!! ??
Why Calendar Entries that retrieved with Platform Service 1.0 doesn't have StartTime & EndTime properties as a Date object and it's just a simple string?? There is a big problem with localization in this way!! I think that is simpler to implement Platform Service in this way but the localization support it's not consistent. Each developer must find his own way to parse localized string of StartTime property and in every language in world!!
...Or something is missing from Platform Services API reference in Web Developer's Library 1.10 and the solution is simpler that I can think...
I'm looking forward for your opinion/solution!!