{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/6681","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6681/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6681/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6681/events","html_url":"https://github.com/crystal-lang/crystal/pull/6681","id":358291064,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MDkyOTQ0","number":6681,"title":"Add support for ISO calendar week to Time","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":[{"id":20487869,"node_id":"MDU6TGFiZWwyMDQ4Nzg2OQ==","url":"https://api.github.com/repos/crystal-lang/crystal/labels/kind:feature","name":"kind:feature","color":"84b6eb","default":false},{"id":253019694,"node_id":"MDU6TGFiZWwyNTMwMTk2OTQ=","url":"https://api.github.com/repos/crystal-lang/crystal/labels/topic:stdlib","name":"topic:stdlib","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/crystal-lang/crystal/milestones/30","html_url":"https://github.com/crystal-lang/crystal/milestone/30","labels_url":"https://api.github.com/repos/crystal-lang/crystal/milestones/30/labels","id":3591614,"node_id":"MDk6TWlsZXN0b25lMzU5MTYxNA==","number":30,"title":"0.27.0","description":"","creator":{"login":"bcardiff","id":459923,"node_id":"MDQ6VXNlcjQ1OTkyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/459923?v=4","gravatar_id":"","url":"https://api.github.com/users/bcardiff","html_url":"https://github.com/bcardiff","followers_url":"https://api.github.com/users/bcardiff/followers","following_url":"https://api.github.com/users/bcardiff/following{/other_user}","gists_url":"https://api.github.com/users/bcardiff/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardiff/subscriptions","organizations_url":"https://api.github.com/users/bcardiff/orgs","repos_url":"https://api.github.com/users/bcardiff/repos","events_url":"https://api.github.com/users/bcardiff/events{/privacy}","received_events_url":"https://api.github.com/users/bcardiff/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":84,"state":"open","created_at":"2018-08-22T18:23:12Z","updated_at":"2018-10-12T17:05:23Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-09-08T12:24:42Z","updated_at":"2018-10-12T20:56:41Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/6681","html_url":"https://github.com/crystal-lang/crystal/pull/6681","diff_url":"https://github.com/crystal-lang/crystal/pull/6681.diff","patch_url":"https://github.com/crystal-lang/crystal/pull/6681.patch"},"body":"This PR adds two methods to `Time` for handling ISO calendar week:\r\n\r\n* `Time#calendar_week` returns the year and week number. The year is important because calendar weeks don't match up with calendar years and the calendar week might actually be in a different year than the regular calendar year (returned by `#year`).\r\n* `Time.week_date` creates a `Time` instance from a week date specified by year, week number and day of week.\r\n\r\nIt also adds directives `%G, %g, %V` which utilize these methods to `Time::Format`.\r\n\r\nThe algorithms for calculating the week number and back are completely annotated in code. They're based on the description on [Wikipedia](https://en.wikipedia.org/wiki/ISO_week_date#Calculation) and the implementation in [Go's stdlib](https://golang.org/src/time/time.go?s=18399:18439#L520) but with a few improvements.\r\n\r\nCloses #2533 \r\nDepends on #6555\r\n"},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/429459801","html_url":"https://github.com/crystal-lang/crystal/pull/6681#issuecomment-429459801","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6681","id":429459801,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQ1OTgwMQ==","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},"created_at":"2018-10-12T20:56:41Z","updated_at":"2018-10-12T20:56:41Z","author_association":"CONTRIBUTOR","body":"Sure, done. But I'm not sure what it adds, it could just be fast forwarded."}}
{"actor":{"display_login":"straight-shoota"}}