{ "id": "134757", "key": "AC-1714", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-09-04T07:27:14.000+0000", "created": "2014-08-14T17:52:16.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:38: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": [], "description": "h3. Steps to Reproduce\nRun this code in a test project. Notice that the values for today and quarterToDate are identical.\n\nvar moment = require('alloy/moment');\n\nvar today = moment();\nvar monthToDate = moment().startOf('month');\nvar quarterToDate = moment().startOf('quarter');\nvar yearToDate = moment().startOf('year');\n\nconsole.log(' today - moment() = ' + JSON.stringify(today));\nconsole.log('monthToDate - moment().startOf('month') = ' + JSON.stringify(monthToDate));\nconsole.log('quarterToDate - moment().startOf('quarter') = ' + JSON.stringify(quarterToDate));\nconsole.log('yearToDate - moment().startOf('year') = ' + JSON.stringify(yearToDate));\n\nh3. Actual Result\n[INFO] : today - moment() = '2014-08-14T17:38:13.789Z'\n[INFO] : monthToDate - moment().startOf('month') = '2014-08-01T04:00:00.000Z'\n[INFO] : quarterToDate - moment().startOf('quarter') = '2014-08-14T17:38:13.789Z'\n[INFO] : yearToDate - moment().startOf('year') = '2014-01-01T05:00:00.000Z'\n\nh3. Expected Result\nquarterToDate - moment().startOf('quarter') = '2014-07-01T17:38:13.789Z'", "attachment": [], "flagged": false, "summary": "moment().startOf('quarter') bugged", "creator": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio 3.3.0", "comment": { "comments": [ { "id": "318817", "author": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "body": "Moment.js is not bugged. Alloy uses an outdated version of it.\r\n\r\nExecuting\r\n~~~\r\nconsole.log(\"[alloy] - moment.version = \" + JSON.stringify(moment.version));\r\n~~~\r\nwill return\r\n~~~\r\n[INFO] : [alloy] - moment.version = \"2.1.0\"\r\n~~~\r\n`moment().startOf('quarter')` apparently wasn't implemented until 2.6.\r\n\r\nSo, is it possible to convert this bug report to a feature request?", "updateAuthor": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-15T13:02:02.000+0000", "updated": "2014-08-15T13:02:02.000+0000" }, { "id": "318971", "author": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "updateAuthor": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "created": "2014-08-16T00:54:42.000+0000", "updated": "2014-08-16T00:54:42.000+0000" }, { "id": "319060", "author": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "body": "If that's the case, then feel free to close.\r\nThanks guys.", "updateAuthor": { "name": "mjstelly_ta", "key": "mjstelly_ta", "displayName": "Michael Stelly", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-18T13:05:36.000+0000", "updated": "2014-08-18T13:05:36.000+0000" }, { "id": "321748", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "ALOY-1096", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-04T07:27:14.000+0000", "updated": "2014-09-04T07:27:14.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }