{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/6314","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6314/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6314/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6314/events","html_url":"https://github.com/crystal-lang/crystal/pull/6314","id":337497834,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NjY0MDYy","number":6314,"title":"Human readable formatting for numbers","user":{"login":"straight-shoota","id":466378,"node_id":"MDQ6VXNlcjQ2NjM3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/466378?v=4","gravatar_id":"","url":"https://api.github.com/users/straight-shoota","html_url":"https://github.com/straight-shoota","followers_url":"https://api.github.com/users/straight-shoota/followers","following_url":"https://api.github.com/users/straight-shoota/following{/other_user}","gists_url":"https://api.github.com/users/straight-shoota/gists{/gist_id}","starred_url":"https://api.github.com/users/straight-shoota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/straight-shoota/subscriptions","organizations_url":"https://api.github.com/users/straight-shoota/orgs","repos_url":"https://api.github.com/users/straight-shoota/repos","events_url":"https://api.github.com/users/straight-shoota/events{/privacy}","received_events_url":"https://api.github.com/users/straight-shoota/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-07-02T12:29:00Z","updated_at":"2018-07-03T15:40:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/6314","html_url":"https://github.com/crystal-lang/crystal/pull/6314","diff_url":"https://github.com/crystal-lang/crystal/pull/6314.diff","patch_url":"https://github.com/crystal-lang/crystal/pull/6314.patch"},"body":"This PR adds three methods for formatting numbers in human-readable formats:\r\n\r\n* `Number#format`: Similar to `#to_s` but allows customized separator and delimiter (useful for localization) and specifying the number of printed decimal places.\r\n* `Number#humanize`: Formats the most significant digits of the number with a prefix indicating the magnitude. Output parameters, prefixes etc. can be fully customized.\r\n* `Int#humanize_bytes`: Specialization of `Number#humanize` for binary units\r\n\r\n```cr\r\n123.4567.format(decimal_places: 3) # => \"123.457\"\r\n1_200_000_000.humanize # => \"1.2G\"\r\n1536.humanize_bytes # => \"1.5KB\"\r\n```\r\n\r\n`Number#humanize` is already put to use in the benchmark module. "},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/402201597","html_url":"https://github.com/crystal-lang/crystal/pull/6314#issuecomment-402201597","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6314","id":402201597,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjIwMTU5Nw==","user":{"login":"RX14","id":2788811,"node_id":"MDQ6VXNlcjI3ODg4MTE=","avatar_url":"https://avatars0.githubusercontent.com/u/2788811?v=4","gravatar_id":"","url":"https://api.github.com/users/RX14","html_url":"https://github.com/RX14","followers_url":"https://api.github.com/users/RX14/followers","following_url":"https://api.github.com/users/RX14/following{/other_user}","gists_url":"https://api.github.com/users/RX14/gists{/gist_id}","starred_url":"https://api.github.com/users/RX14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RX14/subscriptions","organizations_url":"https://api.github.com/users/RX14/orgs","repos_url":"https://api.github.com/users/RX14/repos","events_url":"https://api.github.com/users/RX14/events{/privacy}","received_events_url":"https://api.github.com/users/RX14/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T15:40:45Z","updated_at":"2018-07-03T15:40:45Z","author_association":"MEMBER","body":"@asterite it's not just a convention, it's an official part of git. `git commit --fixup=sha1` and then `git commit --autosquash master`."}}
{"actor":{"display_login":"RX14"}}