{"action":"closed","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/9333","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/9333/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/9333/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/9333/events","html_url":"https://github.com/nodejs/node/issues/9333","id":185863160,"number":9333,"title":"First day and last day in a month not behaving like in the browser. (Date object)","user":{"login":"DusanDimitric","id":14316093,"avatar_url":"https://avatars.githubusercontent.com/u/14316093?v=3","gravatar_id":"","url":"https://api.github.com/users/DusanDimitric","html_url":"https://github.com/DusanDimitric","followers_url":"https://api.github.com/users/DusanDimitric/followers","following_url":"https://api.github.com/users/DusanDimitric/following{/other_user}","gists_url":"https://api.github.com/users/DusanDimitric/gists{/gist_id}","starred_url":"https://api.github.com/users/DusanDimitric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DusanDimitric/subscriptions","organizations_url":"https://api.github.com/users/DusanDimitric/orgs","repos_url":"https://api.github.com/users/DusanDimitric/repos","events_url":"https://api.github.com/users/DusanDimitric/events{/privacy}","received_events_url":"https://api.github.com/users/DusanDimitric/received_events","type":"User","site_admin":false},"labels":[{"id":151728679,"url":"https://api.github.com/repos/nodejs/node/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-28T08:10:06Z","updated_at":"2016-10-28T10:04:24Z","closed_at":"2016-10-28T10:04:24Z","body":"<!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you are able.\r\n-->\r\n\r\n* **Version**:  v6.3.0\r\n* **Platform**: Windows 7 (64bit)\r\n* **Subsystem**: Node Core Runtime - Date object.\r\n\r\n<!-- Enter your issue details below this comment. -->\r\nThis is the code I use to get the first day and the last day of the month in the browser:\r\n\r\n\tvar firstDay = new Date((new Date()).getFullYear(), (new Date()).getMonth(), 1);\r\n\tvar lastDay  = new Date((new Date()).getFullYear(), (new Date()).getMonth() + 1, 0);\r\n\tconsole.log(firstDay);\r\n\tconsole.log(lastDay);\r\n\r\nThe browser gives the following (correct) results:\r\n`Sat Oct 01 2016 00:00:00 GMT+0200 (Central Europe Daylight Time)`\r\n`Mon Oct 31 2016 00:00:00 GMT+0100 (Central Europe Standard Time)`\r\n\r\nYet the Node runtime gives these results:\r\n`2016-09-30T22:00:00.000Z`\r\n`2016-10-30T23:00:00.000Z`\r\n\r\nDisregarding the formatting, the numerical values for month and day aren't what they are when the same code is executed in the browser.\r\n\r\nHas anyone else noticed this?\r\nThanks."}}
{"actor":{"display_login":"DusanDimitric"}}