{"action":"created","issue":{"url":"https://api.github.com/repos/moment/moment/issues/4787","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/4787/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/4787/comments","events_url":"https://api.github.com/repos/moment/moment/issues/4787/events","html_url":"https://github.com/moment/moment/pull/4787","id":363120181,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NjM2MjQw","number":4787,"title":"updated Duration.milliseconds() to return an integer, and added floating point math","user":{"login":"martin770","id":13204495,"node_id":"MDQ6VXNlcjEzMjA0NDk1","avatar_url":"https://avatars2.githubusercontent.com/u/13204495?v=4","gravatar_id":"","url":"https://api.github.com/users/martin770","html_url":"https://github.com/martin770","followers_url":"https://api.github.com/users/martin770/followers","following_url":"https://api.github.com/users/martin770/following{/other_user}","gists_url":"https://api.github.com/users/martin770/gists{/gist_id}","starred_url":"https://api.github.com/users/martin770/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin770/subscriptions","organizations_url":"https://api.github.com/users/martin770/orgs","repos_url":"https://api.github.com/users/martin770/repos","events_url":"https://api.github.com/users/martin770/events{/privacy}","received_events_url":"https://api.github.com/users/martin770/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-24T12:15:08Z","updated_at":"2018-09-24T12:31:28Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/moment/moment/pulls/4787","html_url":"https://github.com/moment/moment/pull/4787","diff_url":"https://github.com/moment/moment/pull/4787.diff","patch_url":"https://github.com/moment/moment/pull/4787.patch"},"body":"I updated duration.milliseconds() to truncate partial milliseconds and return an integer to fix issue https://github.com/moment/moment/issues/4649 while allowing duration.asMilliseconds() to still return a non-integer number.\r\n\r\nAs I was adding test cases for it, I noticed that some of the calculations were incorrect due to javascript floating point math problems. See: https://github.com/moment/moment/issues/2978 and https://github.com/moment/moment/issues/1867\r\n\r\nI added a function (fpMath) to correctly perform floating point calculations, and added test cases around that to make sure everything is behaving as expected. I did not have to modify any existing test cases, so this should not negatively affect any existing functionality.\r\n\r\nI only modified files in /src/ and all the tests are passing, but I wasn't sure if I need to also make the changes to /moment.js also or if that file gets built from src somehow."},"comment":{"url":"https://api.github.com/repos/moment/moment/issues/comments/423958373","html_url":"https://github.com/moment/moment/pull/4787#issuecomment-423958373","issue_url":"https://api.github.com/repos/moment/moment/issues/4787","id":423958373,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzk1ODM3Mw==","user":{"login":"martin770","id":13204495,"node_id":"MDQ6VXNlcjEzMjA0NDk1","avatar_url":"https://avatars2.githubusercontent.com/u/13204495?v=4","gravatar_id":"","url":"https://api.github.com/users/martin770","html_url":"https://github.com/martin770","followers_url":"https://api.github.com/users/martin770/followers","following_url":"https://api.github.com/users/martin770/following{/other_user}","gists_url":"https://api.github.com/users/martin770/gists{/gist_id}","starred_url":"https://api.github.com/users/martin770/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin770/subscriptions","organizations_url":"https://api.github.com/users/martin770/orgs","repos_url":"https://api.github.com/users/martin770/repos","events_url":"https://api.github.com/users/martin770/events{/privacy}","received_events_url":"https://api.github.com/users/martin770/received_events","type":"User","site_admin":false},"created_at":"2018-09-24T12:31:28Z","updated_at":"2018-09-24T12:31:28Z","author_association":"NONE","body":"> You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.\r\n\r\nI signed the CLA, but it says my e-mail address is not linked to my github account. I checked my profile, and it's there..."}}
{"actor":{"display_login":"martin770"}}