{ "id": "175819", "key": "TIMOB-28251", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "21177", "name": "Release 9.3.1", "archived": false, "released": true, "releaseDate": "2021-01-26" } ], "resolution": null, "resolutiondate": null, "created": "2020-11-20T11:18:33.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "DateTimeFormat", "Intl", "android", "locale", "parity", "timezone" ], "versions": [ { "id": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-01-08T14:57:06.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Compared to iOS, the Android implementation seems to maintain a custom version of {{Intl}}, resulting in unexpected API gaps, e.g. for time zones ({{Intl.DateTimeFormat().resolvedOptions().timeZone}}). Can it maybe use the one V8 brings already?", "attachment": [], "flagged": false, "summary": "Android: Add missing options to Intl.DateTimeFormat.resolvedOptions()", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "457667", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We document what is supported on Android and iOS here...\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Global.Intl\r\n\r\nThe only gaps between Android and iOS that I'm aware of are:\r\n* Android doesn't support all {{Collator}} options like iOS.\r\n* The {{DateTimeFormat.resolvedOptions()}} is admittedly half-assed since there isn't a nice way to \"fully\" implement it using the standard Java framework. _(But it can be improved.)_\r\n\r\nWe can add additional features upon request. We don't have a problem with that.\r\nAdding \"timezone\" to {{resolvedOptions()}} is easy to do.\r\n\r\n{quote}Can it maybe use the one V8 brings already?{quote}\r\n\r\nThat's not a good idea. This would involve including the ICU C++ library which is about 20 MB per architecture. This library is way too big and not mobile friendly. Especially since Google Play has an APK size limit of 100 MB. This is why we've written our own custom implementation... and our competitors do the same for the same reason. _(Google provides ICU Java classes as of Android 7.0, but we're several years away until we can make that our min OS version.)_\r\n\r\nWe have written extensive unit tests for the {{Intl}} API that is used to verify Android's behavior against iOS. This should give you confidence about all of the other APIs.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/intl.test.js\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/intl.collator.test.js\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/intl.datetimeformat.test.js\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/intl.numberformat.test.js\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/date.test.js\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/number.test.js\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/tests/Resources/string.test.js\r\n\r\n*Side Note:*\r\nApple's JavaScriptCore and Google's V8 don't have full parity when comes to {{Intl}} APIs anyways. So, platform specific code has to be implemented regardless.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-20T20:44:58.000+0000", "updated": "2020-11-21T01:53:51.000+0000" }, { "id": "457668", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks Josh! For now, I unblocked us by adding {{DateTime.getDefault().id}} in our internal native \"ti.polyfill\" module. It does exactly the job {{Intl.DateTimeFormat().resolvedOptions().timeZone}} does.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-11-20T21:09:55.000+0000", "updated": "2020-11-20T21:09:55.000+0000" }, { "id": "457670", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12282\r\n\r\n_(Note that \"master\" is now Titanium 10.0.0.)_", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-21T02:35:46.000+0000", "updated": "2020-11-21T02:35:46.000+0000" }, { "id": "457983", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed, waiting on Jenkins build", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-07T14:07:34.000+0000", "updated": "2021-01-07T14:07:34.000+0000" }, { "id": "457986", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master, backport PR for 9_3_X is in progress.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-01-07T20:12:25.000+0000", "updated": "2021-01-07T20:12:25.000+0000" }, { "id": "457989", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to 9_3_X for 9.3.1 target.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-01-08T14:57:06.000+0000", "updated": "2021-01-08T14:57:06.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }