{ "id": "125764", "key": "TIMOB-16378", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": null, "resolutiondate": null, "created": "2014-02-03T12:29:36.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:26.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "It would be very helpfull if String.Global could have methods to return the current date and timeformats. Somthing like:\r\ngetDateFormat('medium') -> 'MM/DD/YYYY'\r\ngetTimeFormat('medium') -> 'hh:mm'\r\ngetCurrencySymbol() -> $\r\n\r\nThis would be helpfull when you have a backend that provides titles and labels to your mobile app.\r\n", "attachment": [], "flagged": false, "summary": "TiAPI: Add Get default format methods to Global.String class", "creator": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "subtasks": [], "reporter": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "environment": "Titanium Studio 3.2.0", "comment": { "comments": [ { "id": "291082", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am curious how would different applications would use this information in a consistent way. A date format may be suitable for an application but not another application. What may be a \"medium\" format may be \"large\" format for another application. I would think that it is application specific and should be handled at that level. \n\nWhat may be more relevant is to get the current date and time format for the current locale -\ngetDateFormat()\ngetTimeFormat()\ngetCurrency()\n\nWould something like this work for your use case?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-04T06:32:40.000+0000", "updated": "2014-02-04T06:32:40.000+0000" }, { "id": "291117", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Hi Ritu.\n\nAt this time the String.formatDate() can take small/medium/long as format and returns the different types of formatted dates.\n{code}\nString.formatDate( date, [format] ) : String\n{code}\nSo I thought i would be very relevant to have the parameter.\n\nUse case:\nMy application calls the backend for data to display on the screen..\nThe backend returns the title for a window.\nThe title should be something like *\"From 03/02/2013 to 05/02/2013\"* on a device with *da-DK* Locale,\nThe backend needs the short date format to format the title.\nBut if the title should be something like *\"Sales for 3. Februar 2013\"*\nThe backend needs the medium date format to format the title.\n\nDoes this clarify my request?\n\n", "updateAuthor": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2014-02-04T13:34:20.000+0000", "updated": "2014-02-04T13:34:20.000+0000" }, { "id": "291317", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this feature request to engineering for further evaluation and prioritization. ", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T05:53:53.000+0000", "updated": "2014-02-05T05:53:53.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }