{"action":"closed","number":34,"pull_request":{"url":"https://api.github.com/repos/bitwalker/timex/pulls/34","id":27170693,"html_url":"https://github.com/bitwalker/timex/pull/34","diff_url":"https://github.com/bitwalker/timex/pull/34.diff","patch_url":"https://github.com/bitwalker/timex/pull/34.patch","issue_url":"https://api.github.com/repos/bitwalker/timex/issues/34","number":34,"state":"closed","locked":false,"title":"Fix incorrect unit names in the docs for Timex.Time functions","user":{"login":"alco","id":207748,"avatar_url":"https://avatars.githubusercontent.com/u/207748?v=3","gravatar_id":"","url":"https://api.github.com/users/alco","html_url":"https://github.com/alco","followers_url":"https://api.github.com/users/alco/followers","following_url":"https://api.github.com/users/alco/following{/other_user}","gists_url":"https://api.github.com/users/alco/gists{/gist_id}","starred_url":"https://api.github.com/users/alco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alco/subscriptions","organizations_url":"https://api.github.com/users/alco/orgs","repos_url":"https://api.github.com/users/alco/repos","events_url":"https://api.github.com/users/alco/events{/privacy}","received_events_url":"https://api.github.com/users/alco/received_events","type":"User","site_admin":false},"body":"This patch fixes outdated docs.\r\n\r\nNowadays, I would actually use full names for the units. Those would be simpler and more intuitive for the users: `:secs` -> `:seconds`, `:mins` -> `:minutes`, `:usecs` -> `:microseconds`, etc. Users are likely to utilize just one or two units, so they can wrap those long names in a function for convenience, like so:\r\n\r\n```elixir\r\ndefmodule MyApp.Utils do\r\n  @doc \"Returns the difference between two timestamps in microseconds\"\r\n  @spec time_diff(Timex.Date.timestamp, Timex.Date.timestamp) :: Timex.Date.microseconds\r\n  def time_diff(timestamp1, timestamp2) do\r\n    Timex.Time.diff(timestamp1, timestamp2, :microseconds)\r\n  end\r\nend\r\n```","created_at":"2015-01-12T00:19:58Z","updated_at":"2015-01-14T19:06:33Z","closed_at":"2015-01-14T19:06:33Z","merged_at":"2015-01-14T19:06:33Z","merge_commit_sha":"3d34e98c4f6d3bc9f16117736cfb47196bd961b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitwalker/timex/pulls/34/commits","review_comments_url":"https://api.github.com/repos/bitwalker/timex/pulls/34/comments","review_comment_url":"https://api.github.com/repos/bitwalker/timex/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bitwalker/timex/issues/34/comments","statuses_url":"https://api.github.com/repos/bitwalker/timex/statuses/7e58aefd5382262fbd7ceaafdc7fed0bc0b4792c","head":{"label":"alco:time-unit-usage","ref":"time-unit-usage","sha":"7e58aefd5382262fbd7ceaafdc7fed0bc0b4792c","user":{"login":"alco","id":207748,"avatar_url":"https://avatars.githubusercontent.com/u/207748?v=3","gravatar_id":"","url":"https://api.github.com/users/alco","html_url":"https://github.com/alco","followers_url":"https://api.github.com/users/alco/followers","following_url":"https://api.github.com/users/alco/following{/other_user}","gists_url":"https://api.github.com/users/alco/gists{/gist_id}","starred_url":"https://api.github.com/users/alco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alco/subscriptions","organizations_url":"https://api.github.com/users/alco/orgs","repos_url":"https://api.github.com/users/alco/repos","events_url":"https://api.github.com/users/alco/events{/privacy}","received_events_url":"https://api.github.com/users/alco/received_events","type":"User","site_admin":false},"repo":{"id":28783908,"name":"timex","full_name":"alco/timex","owner":{"login":"alco","id":207748,"avatar_url":"https://avatars.githubusercontent.com/u/207748?v=3","gravatar_id":"","url":"https://api.github.com/users/alco","html_url":"https://github.com/alco","followers_url":"https://api.github.com/users/alco/followers","following_url":"https://api.github.com/users/alco/following{/other_user}","gists_url":"https://api.github.com/users/alco/gists{/gist_id}","starred_url":"https://api.github.com/users/alco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alco/subscriptions","organizations_url":"https://api.github.com/users/alco/orgs","repos_url":"https://api.github.com/users/alco/repos","events_url":"https://api.github.com/users/alco/events{/privacy}","received_events_url":"https://api.github.com/users/alco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alco/timex","description":"A complete date/time library for Elixir projects.","fork":true,"url":"https://api.github.com/repos/alco/timex","forks_url":"https://api.github.com/repos/alco/timex/forks","keys_url":"https://api.github.com/repos/alco/timex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alco/timex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alco/timex/teams","hooks_url":"https://api.github.com/repos/alco/timex/hooks","issue_events_url":"https://api.github.com/repos/alco/timex/issues/events{/number}","events_url":"https://api.github.com/repos/alco/timex/events","assignees_url":"https://api.github.com/repos/alco/timex/assignees{/user}","branches_url":"https://api.github.com/repos/alco/timex/branches{/branch}","tags_url":"https://api.github.com/repos/alco/timex/tags","blobs_url":"https://api.github.com/repos/alco/timex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alco/timex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alco/timex/git/refs{/sha}","trees_url":"https://api.github.com/repos/alco/timex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alco/timex/statuses/{sha}","languages_url":"https://api.github.com/repos/alco/timex/languages","stargazers_url":"https://api.github.com/repos/alco/timex/stargazers","contributors_url":"https://api.github.com/repos/alco/timex/contributors","subscribers_url":"https://api.github.com/repos/alco/timex/subscribers","subscription_url":"https://api.github.com/repos/alco/timex/subscription","commits_url":"https://api.github.com/repos/alco/timex/commits{/sha}","git_commits_url":"https://api.github.com/repos/alco/timex/git/commits{/sha}","comments_url":"https://api.github.com/repos/alco/timex/comments{/number}","issue_comment_url":"https://api.github.com/repos/alco/timex/issues/comments/{number}","contents_url":"https://api.github.com/repos/alco/timex/contents/{+path}","compare_url":"https://api.github.com/repos/alco/timex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alco/timex/merges","archive_url":"https://api.github.com/repos/alco/timex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alco/timex/downloads","issues_url":"https://api.github.com/repos/alco/timex/issues{/number}","pulls_url":"https://api.github.com/repos/alco/timex/pulls{/number}","milestones_url":"https://api.github.com/repos/alco/timex/milestones{/number}","notifications_url":"https://api.github.com/repos/alco/timex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alco/timex/labels{/name}","releases_url":"https://api.github.com/repos/alco/timex/releases{/id}","created_at":"2015-01-04T19:37:36Z","updated_at":"2015-01-04T19:37:37Z","pushed_at":"2015-01-12T00:12:41Z","git_url":"git://github.com/alco/timex.git","ssh_url":"git@github.com:alco/timex.git","clone_url":"https://github.com/alco/timex.git","svn_url":"https://github.com/alco/timex","homepage":null,"size":1175,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"bitwalker:master","ref":"master","sha":"e5f295411d0a1b5a69568ab5671f9088fe658b33","user":{"login":"bitwalker","id":955793,"avatar_url":"https://avatars.githubusercontent.com/u/955793?v=3","gravatar_id":"","url":"https://api.github.com/users/bitwalker","html_url":"https://github.com/bitwalker","followers_url":"https://api.github.com/users/bitwalker/followers","following_url":"https://api.github.com/users/bitwalker/following{/other_user}","gists_url":"https://api.github.com/users/bitwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/bitwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitwalker/subscriptions","organizations_url":"https://api.github.com/users/bitwalker/orgs","repos_url":"https://api.github.com/users/bitwalker/repos","events_url":"https://api.github.com/users/bitwalker/events{/privacy}","received_events_url":"https://api.github.com/users/bitwalker/received_events","type":"User","site_admin":false},"repo":{"id":22305306,"name":"timex","full_name":"bitwalker/timex","owner":{"login":"bitwalker","id":955793,"avatar_url":"https://avatars.githubusercontent.com/u/955793?v=3","gravatar_id":"","url":"https://api.github.com/users/bitwalker","html_url":"https://github.com/bitwalker","followers_url":"https://api.github.com/users/bitwalker/followers","following_url":"https://api.github.com/users/bitwalker/following{/other_user}","gists_url":"https://api.github.com/users/bitwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/bitwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitwalker/subscriptions","organizations_url":"https://api.github.com/users/bitwalker/orgs","repos_url":"https://api.github.com/users/bitwalker/repos","events_url":"https://api.github.com/users/bitwalker/events{/privacy}","received_events_url":"https://api.github.com/users/bitwalker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bitwalker/timex","description":"A complete date/time library for Elixir projects.","fork":false,"url":"https://api.github.com/repos/bitwalker/timex","forks_url":"https://api.github.com/repos/bitwalker/timex/forks","keys_url":"https://api.github.com/repos/bitwalker/timex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitwalker/timex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitwalker/timex/teams","hooks_url":"https://api.github.com/repos/bitwalker/timex/hooks","issue_events_url":"https://api.github.com/repos/bitwalker/timex/issues/events{/number}","events_url":"https://api.github.com/repos/bitwalker/timex/events","assignees_url":"https://api.github.com/repos/bitwalker/timex/assignees{/user}","branches_url":"https://api.github.com/repos/bitwalker/timex/branches{/branch}","tags_url":"https://api.github.com/repos/bitwalker/timex/tags","blobs_url":"https://api.github.com/repos/bitwalker/timex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitwalker/timex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitwalker/timex/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitwalker/timex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitwalker/timex/statuses/{sha}","languages_url":"https://api.github.com/repos/bitwalker/timex/languages","stargazers_url":"https://api.github.com/repos/bitwalker/timex/stargazers","contributors_url":"https://api.github.com/repos/bitwalker/timex/contributors","subscribers_url":"https://api.github.com/repos/bitwalker/timex/subscribers","subscription_url":"https://api.github.com/repos/bitwalker/timex/subscription","commits_url":"https://api.github.com/repos/bitwalker/timex/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitwalker/timex/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitwalker/timex/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitwalker/timex/issues/comments/{number}","contents_url":"https://api.github.com/repos/bitwalker/timex/contents/{+path}","compare_url":"https://api.github.com/repos/bitwalker/timex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitwalker/timex/merges","archive_url":"https://api.github.com/repos/bitwalker/timex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitwalker/timex/downloads","issues_url":"https://api.github.com/repos/bitwalker/timex/issues{/number}","pulls_url":"https://api.github.com/repos/bitwalker/timex/pulls{/number}","milestones_url":"https://api.github.com/repos/bitwalker/timex/milestones{/number}","notifications_url":"https://api.github.com/repos/bitwalker/timex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitwalker/timex/labels{/name}","releases_url":"https://api.github.com/repos/bitwalker/timex/releases{/id}","created_at":"2014-07-27T06:53:52Z","updated_at":"2015-01-14T19:06:34Z","pushed_at":"2015-01-14T19:06:34Z","git_url":"git://github.com/bitwalker/timex.git","ssh_url":"git@github.com:bitwalker/timex.git","clone_url":"https://github.com/bitwalker/timex.git","svn_url":"https://github.com/bitwalker/timex","homepage":null,"size":1530,"stargazers_count":53,"watchers_count":53,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":11,"forks":17,"open_issues":11,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitwalker/timex/pulls/34"},"html":{"href":"https://github.com/bitwalker/timex/pull/34"},"issue":{"href":"https://api.github.com/repos/bitwalker/timex/issues/34"},"comments":{"href":"https://api.github.com/repos/bitwalker/timex/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/bitwalker/timex/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/bitwalker/timex/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bitwalker/timex/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/bitwalker/timex/statuses/7e58aefd5382262fbd7ceaafdc7fed0bc0b4792c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bitwalker","id":955793,"avatar_url":"https://avatars.githubusercontent.com/u/955793?v=3","gravatar_id":"","url":"https://api.github.com/users/bitwalker","html_url":"https://github.com/bitwalker","followers_url":"https://api.github.com/users/bitwalker/followers","following_url":"https://api.github.com/users/bitwalker/following{/other_user}","gists_url":"https://api.github.com/users/bitwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/bitwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitwalker/subscriptions","organizations_url":"https://api.github.com/users/bitwalker/orgs","repos_url":"https://api.github.com/users/bitwalker/repos","events_url":"https://api.github.com/users/bitwalker/events{/privacy}","received_events_url":"https://api.github.com/users/bitwalker/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":15,"deletions":8,"changed_files":2}}