{"action":"opened","number":109,"pull_request":{"url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/109","id":92013937,"html_url":"https://github.com/EvanHahn/HumanizeDuration.js/pull/109","diff_url":"https://github.com/EvanHahn/HumanizeDuration.js/pull/109.diff","patch_url":"https://github.com/EvanHahn/HumanizeDuration.js/pull/109.patch","issue_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues/109","number":109,"state":"open","locked":false,"title":"Added support for custom rounding functions.","user":{"login":"whitelynx","id":285264,"avatar_url":"https://avatars.githubusercontent.com/u/285264?v=3","gravatar_id":"","url":"https://api.github.com/users/whitelynx","html_url":"https://github.com/whitelynx","followers_url":"https://api.github.com/users/whitelynx/followers","following_url":"https://api.github.com/users/whitelynx/following{/other_user}","gists_url":"https://api.github.com/users/whitelynx/gists{/gist_id}","starred_url":"https://api.github.com/users/whitelynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitelynx/subscriptions","organizations_url":"https://api.github.com/users/whitelynx/orgs","repos_url":"https://api.github.com/users/whitelynx/repos","events_url":"https://api.github.com/users/whitelynx/events{/privacy}","received_events_url":"https://api.github.com/users/whitelynx/received_events","type":"User","site_admin":false},"body":"Two test cases in the unit test for usage with the `largest` option currently fail in ways that suggest issues in other code.\r\n\r\n----\r\n\r\nSome background on my motivations for this change: Since version 2.0.0, Moment.js has a [different default rounding scheme](http://momentjs.com/docs/#/displaying/difference/) than HumanizeDuration.js. (though [that is configurable](http://momentjs.com/docs/#/customization/relative-time-rounding/)) In many cases Moment.js's default of always rounding toward zero (effectively using `Math.floor()` for positive numbers) makes sense; for instance, if you're rounding to weeks, it may not be desirable to show \"2 weeks\" until you've actually hit 14 days, and instead display e.g. \"1 week\" if the duration is 13 days.","created_at":"2016-11-02T17:09:11Z","updated_at":"2016-11-02T17:09:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/109/commits","review_comments_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/109/comments","review_comment_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues/109/comments","statuses_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/statuses/9fc2726fddad14aff2dce20fb2c95a83dca5c99d","head":{"label":"whitelynx:custom-rounding","ref":"custom-rounding","sha":"9fc2726fddad14aff2dce20fb2c95a83dca5c99d","user":{"login":"whitelynx","id":285264,"avatar_url":"https://avatars.githubusercontent.com/u/285264?v=3","gravatar_id":"","url":"https://api.github.com/users/whitelynx","html_url":"https://github.com/whitelynx","followers_url":"https://api.github.com/users/whitelynx/followers","following_url":"https://api.github.com/users/whitelynx/following{/other_user}","gists_url":"https://api.github.com/users/whitelynx/gists{/gist_id}","starred_url":"https://api.github.com/users/whitelynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitelynx/subscriptions","organizations_url":"https://api.github.com/users/whitelynx/orgs","repos_url":"https://api.github.com/users/whitelynx/repos","events_url":"https://api.github.com/users/whitelynx/events{/privacy}","received_events_url":"https://api.github.com/users/whitelynx/received_events","type":"User","site_admin":false},"repo":{"id":72654253,"name":"HumanizeDuration.js","full_name":"whitelynx/HumanizeDuration.js","owner":{"login":"whitelynx","id":285264,"avatar_url":"https://avatars.githubusercontent.com/u/285264?v=3","gravatar_id":"","url":"https://api.github.com/users/whitelynx","html_url":"https://github.com/whitelynx","followers_url":"https://api.github.com/users/whitelynx/followers","following_url":"https://api.github.com/users/whitelynx/following{/other_user}","gists_url":"https://api.github.com/users/whitelynx/gists{/gist_id}","starred_url":"https://api.github.com/users/whitelynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitelynx/subscriptions","organizations_url":"https://api.github.com/users/whitelynx/orgs","repos_url":"https://api.github.com/users/whitelynx/repos","events_url":"https://api.github.com/users/whitelynx/events{/privacy}","received_events_url":"https://api.github.com/users/whitelynx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whitelynx/HumanizeDuration.js","description":"361000 becomes \"6 minutes, 1 second\"","fork":true,"url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js","forks_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/forks","keys_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/teams","hooks_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/hooks","issue_events_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/issues/events{/number}","events_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/events","assignees_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/assignees{/user}","branches_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/branches{/branch}","tags_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/tags","blobs_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/statuses/{sha}","languages_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/languages","stargazers_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/stargazers","contributors_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/contributors","subscribers_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/subscribers","subscription_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/subscription","commits_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/contents/{+path}","compare_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/merges","archive_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/downloads","issues_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/issues{/number}","pulls_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/pulls{/number}","milestones_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/milestones{/number}","notifications_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/labels{/name}","releases_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/releases{/id}","deployments_url":"https://api.github.com/repos/whitelynx/HumanizeDuration.js/deployments","created_at":"2016-11-02T15:36:18Z","updated_at":"2016-11-02T15:36:19Z","pushed_at":"2016-11-02T17:01:35Z","git_url":"git://github.com/whitelynx/HumanizeDuration.js.git","ssh_url":"git@github.com:whitelynx/HumanizeDuration.js.git","clone_url":"https://github.com/whitelynx/HumanizeDuration.js.git","svn_url":"https://github.com/whitelynx/HumanizeDuration.js","homepage":"http://evanhahn.github.io/HumanizeDuration.js/","size":611,"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":"EvanHahn:master","ref":"master","sha":"157c212d651e229d229cf0445aff3f89e5a095f8","user":{"login":"EvanHahn","id":777712,"avatar_url":"https://avatars.githubusercontent.com/u/777712?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHahn","html_url":"https://github.com/EvanHahn","followers_url":"https://api.github.com/users/EvanHahn/followers","following_url":"https://api.github.com/users/EvanHahn/following{/other_user}","gists_url":"https://api.github.com/users/EvanHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHahn/subscriptions","organizations_url":"https://api.github.com/users/EvanHahn/orgs","repos_url":"https://api.github.com/users/EvanHahn/repos","events_url":"https://api.github.com/users/EvanHahn/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHahn/received_events","type":"User","site_admin":false},"repo":{"id":11379851,"name":"HumanizeDuration.js","full_name":"EvanHahn/HumanizeDuration.js","owner":{"login":"EvanHahn","id":777712,"avatar_url":"https://avatars.githubusercontent.com/u/777712?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHahn","html_url":"https://github.com/EvanHahn","followers_url":"https://api.github.com/users/EvanHahn/followers","following_url":"https://api.github.com/users/EvanHahn/following{/other_user}","gists_url":"https://api.github.com/users/EvanHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHahn/subscriptions","organizations_url":"https://api.github.com/users/EvanHahn/orgs","repos_url":"https://api.github.com/users/EvanHahn/repos","events_url":"https://api.github.com/users/EvanHahn/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHahn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EvanHahn/HumanizeDuration.js","description":"361000 becomes \"6 minutes, 1 second\"","fork":false,"url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js","forks_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/forks","keys_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/teams","hooks_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/hooks","issue_events_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues/events{/number}","events_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/events","assignees_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/assignees{/user}","branches_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/branches{/branch}","tags_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/tags","blobs_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/statuses/{sha}","languages_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/languages","stargazers_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/stargazers","contributors_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/contributors","subscribers_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/subscribers","subscription_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/subscription","commits_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/contents/{+path}","compare_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/merges","archive_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/downloads","issues_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues{/number}","pulls_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls{/number}","milestones_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/milestones{/number}","notifications_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/labels{/name}","releases_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/releases{/id}","deployments_url":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/deployments","created_at":"2013-07-12T23:09:10Z","updated_at":"2016-10-30T09:04:17Z","pushed_at":"2016-09-29T20:11:27Z","git_url":"git://github.com/EvanHahn/HumanizeDuration.js.git","ssh_url":"git@github.com:EvanHahn/HumanizeDuration.js.git","clone_url":"https://github.com/EvanHahn/HumanizeDuration.js.git","svn_url":"https://github.com/EvanHahn/HumanizeDuration.js","homepage":"http://evanhahn.github.io/HumanizeDuration.js/","size":611,"stargazers_count":212,"watchers_count":212,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":4,"forks":73,"open_issues":4,"watchers":212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/109"},"html":{"href":"https://github.com/EvanHahn/HumanizeDuration.js/pull/109"},"issue":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues/109"},"comments":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/EvanHahn/HumanizeDuration.js/statuses/9fc2726fddad14aff2dce20fb2c95a83dca5c99d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":58,"deletions":4,"changed_files":6}}
{"actor":{"display_login":"whitelynx"}}