{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/comments/52928955","id":52928955,"diff_hunk":"@@ -67,3 +67,23 @@ it('should parse milliseconds into an object', function () {\n \t\tmilliseconds: 0\n \t});\n });\n+\n+it('should handle negative millisecond values', function () {\n+  [\n+    100 + 400,\n+    1000 * 55,\n+    1000 * 67,\n+    1000 * 60 * 5,\n+    1000 * 60 * 67,\n+    1000 * 60 * 60 * 12,\n+    1000 * 60 * 60 * 40,\n+    1000 * 60 * 60 * 999\n+  ].forEach(function (ms) {\n+    var positive = parseMs(ms)\n+    var negative = parseMs(-ms)\n+    for (var key in negative) {\n+      assert.equal(negative[key], -positive[key]);\n+    }\n+  })\n+});","path":"test.js","position":22,"original_position":22,"commit_id":"e69bc24d8122e980f59dcd99b037d1efcbd658ae","original_commit_id":"e69bc24d8122e980f59dcd99b037d1efcbd658ae","user":{"login":"Qix-","id":885648,"avatar_url":"https://avatars.githubusercontent.com/u/885648?v=3","gravatar_id":"","url":"https://api.github.com/users/Qix-","html_url":"https://github.com/Qix-","followers_url":"https://api.github.com/users/Qix-/followers","following_url":"https://api.github.com/users/Qix-/following{/other_user}","gists_url":"https://api.github.com/users/Qix-/gists{/gist_id}","starred_url":"https://api.github.com/users/Qix-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qix-/subscriptions","organizations_url":"https://api.github.com/users/Qix-/orgs","repos_url":"https://api.github.com/users/Qix-/repos","events_url":"https://api.github.com/users/Qix-/events{/privacy}","received_events_url":"https://api.github.com/users/Qix-/received_events","type":"User","site_admin":false},"body":"Please use tabs for indentation here.","created_at":"2016-02-15T18:10:06Z","updated_at":"2016-02-15T18:10:06Z","html_url":"https://github.com/sindresorhus/parse-ms/pull/1#discussion_r52928955","pull_request_url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/comments/52928955"},"html":{"href":"https://github.com/sindresorhus/parse-ms/pull/1#discussion_r52928955"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1","id":59306567,"html_url":"https://github.com/sindresorhus/parse-ms/pull/1","diff_url":"https://github.com/sindresorhus/parse-ms/pull/1.diff","patch_url":"https://github.com/sindresorhus/parse-ms/pull/1.patch","issue_url":"https://api.github.com/repos/sindresorhus/parse-ms/issues/1","number":1,"state":"open","locked":false,"title":"Handle negative ms values","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"body":"Currently, doing `parseMs(-1)` yields `{ days: -1, hours: -1, minutes: -1, seconds: -1, milliseconds: -1 }`, whereas I'd expect `{ days: 0, hours: 0, minutes: 0, seconds: 0, milliseconds: -1 }`.\r\n\r\nThis patch yields the latter by using `num | 0` to round \"towards zero\" instead of `Math.floor(num)`.","created_at":"2016-02-14T21:29:12Z","updated_at":"2016-02-15T18:10:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b142311e6f58fd5aff86aab3232631d6e4adeaba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/parse-ms/issues/1/comments","statuses_url":"https://api.github.com/repos/sindresorhus/parse-ms/statuses/e69bc24d8122e980f59dcd99b037d1efcbd658ae","head":{"label":"anandthakker:master","ref":"master","sha":"e69bc24d8122e980f59dcd99b037d1efcbd658ae","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"repo":{"id":51714173,"name":"parse-ms","full_name":"anandthakker/parse-ms","owner":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anandthakker/parse-ms","description":"Parse milliseconds into an object","fork":true,"url":"https://api.github.com/repos/anandthakker/parse-ms","forks_url":"https://api.github.com/repos/anandthakker/parse-ms/forks","keys_url":"https://api.github.com/repos/anandthakker/parse-ms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anandthakker/parse-ms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anandthakker/parse-ms/teams","hooks_url":"https://api.github.com/repos/anandthakker/parse-ms/hooks","issue_events_url":"https://api.github.com/repos/anandthakker/parse-ms/issues/events{/number}","events_url":"https://api.github.com/repos/anandthakker/parse-ms/events","assignees_url":"https://api.github.com/repos/anandthakker/parse-ms/assignees{/user}","branches_url":"https://api.github.com/repos/anandthakker/parse-ms/branches{/branch}","tags_url":"https://api.github.com/repos/anandthakker/parse-ms/tags","blobs_url":"https://api.github.com/repos/anandthakker/parse-ms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anandthakker/parse-ms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anandthakker/parse-ms/git/refs{/sha}","trees_url":"https://api.github.com/repos/anandthakker/parse-ms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anandthakker/parse-ms/statuses/{sha}","languages_url":"https://api.github.com/repos/anandthakker/parse-ms/languages","stargazers_url":"https://api.github.com/repos/anandthakker/parse-ms/stargazers","contributors_url":"https://api.github.com/repos/anandthakker/parse-ms/contributors","subscribers_url":"https://api.github.com/repos/anandthakker/parse-ms/subscribers","subscription_url":"https://api.github.com/repos/anandthakker/parse-ms/subscription","commits_url":"https://api.github.com/repos/anandthakker/parse-ms/commits{/sha}","git_commits_url":"https://api.github.com/repos/anandthakker/parse-ms/git/commits{/sha}","comments_url":"https://api.github.com/repos/anandthakker/parse-ms/comments{/number}","issue_comment_url":"https://api.github.com/repos/anandthakker/parse-ms/issues/comments{/number}","contents_url":"https://api.github.com/repos/anandthakker/parse-ms/contents/{+path}","compare_url":"https://api.github.com/repos/anandthakker/parse-ms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anandthakker/parse-ms/merges","archive_url":"https://api.github.com/repos/anandthakker/parse-ms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anandthakker/parse-ms/downloads","issues_url":"https://api.github.com/repos/anandthakker/parse-ms/issues{/number}","pulls_url":"https://api.github.com/repos/anandthakker/parse-ms/pulls{/number}","milestones_url":"https://api.github.com/repos/anandthakker/parse-ms/milestones{/number}","notifications_url":"https://api.github.com/repos/anandthakker/parse-ms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anandthakker/parse-ms/labels{/name}","releases_url":"https://api.github.com/repos/anandthakker/parse-ms/releases{/id}","deployments_url":"https://api.github.com/repos/anandthakker/parse-ms/deployments","created_at":"2016-02-14T21:15:00Z","updated_at":"2016-02-14T21:15:01Z","pushed_at":"2016-02-15T17:52:19Z","git_url":"git://github.com/anandthakker/parse-ms.git","ssh_url":"git@github.com:anandthakker/parse-ms.git","clone_url":"https://github.com/anandthakker/parse-ms.git","svn_url":"https://github.com/anandthakker/parse-ms","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sindresorhus:master","ref":"master","sha":"a99fee9b9b23a013ea5f24779d11fdc4dd42b139","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":17958701,"name":"parse-ms","full_name":"sindresorhus/parse-ms","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/parse-ms","description":"Parse milliseconds into an object","fork":false,"url":"https://api.github.com/repos/sindresorhus/parse-ms","forks_url":"https://api.github.com/repos/sindresorhus/parse-ms/forks","keys_url":"https://api.github.com/repos/sindresorhus/parse-ms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/parse-ms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/parse-ms/teams","hooks_url":"https://api.github.com/repos/sindresorhus/parse-ms/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/parse-ms/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/parse-ms/events","assignees_url":"https://api.github.com/repos/sindresorhus/parse-ms/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/parse-ms/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/parse-ms/tags","blobs_url":"https://api.github.com/repos/sindresorhus/parse-ms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/parse-ms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/parse-ms/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/parse-ms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/parse-ms/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/parse-ms/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/parse-ms/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/parse-ms/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/parse-ms/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/parse-ms/subscription","commits_url":"https://api.github.com/repos/sindresorhus/parse-ms/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/parse-ms/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/parse-ms/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/parse-ms/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/parse-ms/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/parse-ms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/parse-ms/merges","archive_url":"https://api.github.com/repos/sindresorhus/parse-ms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/parse-ms/downloads","issues_url":"https://api.github.com/repos/sindresorhus/parse-ms/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/parse-ms/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/parse-ms/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/parse-ms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/parse-ms/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/parse-ms/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/parse-ms/deployments","created_at":"2014-03-20T21:12:13Z","updated_at":"2016-02-14T21:44:56Z","pushed_at":"2016-02-15T17:52:20Z","git_url":"git://github.com/sindresorhus/parse-ms.git","ssh_url":"git@github.com:sindresorhus/parse-ms.git","clone_url":"https://github.com/sindresorhus/parse-ms.git","svn_url":"https://github.com/sindresorhus/parse-ms","homepage":null,"size":139,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1"},"html":{"href":"https://github.com/sindresorhus/parse-ms/pull/1"},"issue":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/issues/1"},"comments":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/parse-ms/statuses/e69bc24d8122e980f59dcd99b037d1efcbd658ae"}}}}