[TIMOB-18302] Date object saved with App.Properties.setObject retrieved as string with getObject on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android |
Reporter | Michiel van Eerd |
Assignee | Unknown |
Created | 2015-01-04T13:00:18.000+0000 |
Updated | 2018-02-28T19:55:59.000+0000 |
Description
When retrieving a javascript Date object from App.Properties with Ti.App.Properties.getObject that has been saved with Ti.App.Properties.setObject, it is returned as a string on Android.
*Example:*
{noformat}
var date = new Date();
Ti.App.Properties.setObject("date", date);
var retrievedDate = Ti.App.Properties.getObject("date");
console.log(typeof retrievedDate);
// On android this will echo "string"
// On iOS this will echo "object"
{noformat}
This bug is stil valid for 5.2.2GA. Any chance to fix it?