{ "id": "175002", "key": "TIMOB-27892", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-07-19T14:16:20.000+0000", "created": "2020-05-08T18:57:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "DateTimeFormat", "Intl", "NumberFormat", "android", "format", "locale", "localization", "parity" ], "versions": [], "issuelinks": [ { "id": "58366", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "173051", "key": "TIMOB-26858", "fields": { "summary": "Android (V8): toLocaleDateString has different outputs on iOS and Android", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "58363", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "173876", "key": "TIMOB-27240", "fields": { "summary": "Android: Add Intl.NumberFormat support", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "58362", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175000", "key": "TIMOB-27890", "fields": { "summary": "Android: Add Intl.DateTimeFormat support", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "59012", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172796", "key": "TIMOB-26682", "fields": { "summary": "Android: ES6 template strings causing memory leak + crash", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-12-04T20:31:12.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": "*Summary:*\r\nOn Android, the following methods ignore the {{locales}} and {{options}} arguments. They also ignore the current locale and always use {{\"en-US\"}} when formatting a string.\r\n* [Date.toLocaleString()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString]\r\n* [Date.toLocaleDateString()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString]\r\n* [Date.toLocaleTimeString()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString]\r\n* [Number.toLocaleString()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString]\r\n* [String.localeCompare()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare]\r\n* [String.toLocaleLowerCase()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase]\r\n* [String.toLocaleUpperCase()|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase]\r\n\r\nOn iOS, the above methods *+do+* support locale/options.\r\nWe should add the same on Android for parity and to better support the standard JavaScript APIs.\r\n\r\n*Note:*\r\nTo add official {{Intl}} support to V8, we would have to {{#if}} it in, but this involves adding the ICU (International Components for Unicode) C++ library which is about 20 MB per architecture. This is too big and is not mobile friendly. Especially since Google Play has a 100 MB limit on APKs. So, the most reasonable solution is to implement this ourselves in Java.\r\n\r\n*Alternatives:*\r\nOn older Titanium versions, your only option to generate localized strings was via APIs:\r\n* [String.formatDecimal()|https://docs.appcelerator.com/platform/latest/#!/api/Global.String-method-formatDecimal]\r\n* [String.formatDate()|https://docs.appcelerator.com/platform/latest/#!/api/Global.String-method-formatDate]\r\n* [String.formatTime()|https://docs.appcelerator.com/platform/latest/#!/api/Global.String-method-formatTime]\r\n", "attachment": [], "flagged": false, "summary": "Android: Update toLocale*String() methods to support locale/options", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1201, "state": "closed", "name": "2020 Sprint 14", "startDate": "2020-07-06T15:40:00.000Z", "endDate": "2020-07-17T15:40:00.000Z", "completeDate": "2020-07-20T22:16:28.367Z", "originBoardId": 114 }, { "id": 1202, "state": "closed", "name": "2020 Sprint 15", "startDate": "2020-07-20T22:16:05.601Z", "endDate": "2020-07-31T22:16:00.000Z", "completeDate": "2020-08-03T20:27:12.585Z", "originBoardId": 114 }, { "id": 1195, "state": "closed", "name": "2020 Sprint 10", "startDate": "2020-05-08T16:37:58.282Z", "endDate": "2020-05-22T16:37:00.000Z", "completeDate": "2020-05-21T15:26:11.089Z", "originBoardId": 114 }, { "id": 1196, "state": "closed", "name": "2020 Sprint 11", "startDate": "2020-05-26T15:56:00.000Z", "endDate": "2020-06-05T15:56:00.000Z", "completeDate": "2020-06-08T21:05:50.356Z", "originBoardId": 114 }, { "id": 1198, "state": "closed", "name": "2020 Sprint 12", "startDate": "2020-06-08T21:06:41.849Z", "endDate": "2020-06-19T21:06:00.000Z", "completeDate": "2020-06-19T15:54:38.493Z", "originBoardId": 114 }, { "id": 1199, "state": "closed", "name": "2020 Sprint 13", "startDate": "2020-06-19T16:41:04.099Z", "endDate": "2020-07-02T16:41:00.000Z", "completeDate": "2020-07-02T15:37:12.455Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455422", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11698", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-09T04:27:09.000+0000", "updated": "2020-05-09T04:27:09.000+0000" }, { "id": "456151", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "manually rebase/merged to master, 9_1_X, 9_3_X", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-07-19T14:16:20.000+0000", "updated": "2020-07-19T14:16:20.000+0000" }, { "id": "456290", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.1.0.v20200724110711}}, {{9.2.0.v20200724112452}} and {{9.3.0.v20200724114100}}.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11698\r\nPR (master): https://github.com/appcelerator/titanium_mobile/pull/11830\r\nPR (9.1.x): https://github.com/appcelerator/titanium_mobile/pull/11831\r\n\r\n*Test Environment*\r\n{code:java}\r\nMacOS Big Sur: 11.0 Beta\r\nXcode: 12.0 Beta \r\nJava Version: 1.8.0_242\r\nAndroid NDK: 21.3.6528147\r\nNode.js: 12.18.1\r\n\"\"NPM\":\"5.0.0\",\"CLI\":\"8.1.0-master.5\"\"\r\nAPI19 Nexus5X\r\nAPI29 Pixel XL emulator\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-30T13:02:12.000+0000", "updated": "2020-07-30T13:04:27.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }