{"action":"created","comment":{"url":"https://api.github.com/repos/ogham/rust-datetime/pulls/comments/33888935","id":33888935,"diff_hunk":"@@ -271,6 +271,64 @@ fn split_cycles(number_of_periods: i64, cycle_length: i64) -> (i64, i64) {\n \n impl LocalDate {\n \n+    /// Manually create a new `LocalDate`.\n+    ///\n+    /// Takes integer values for `year:i64`, `month:i8`, `day:i8` .\n+    pub fn new(year:i64, month:i8, day:i8) -> Option<LocalDate> {\n+        match (year, month, day) {\n+             (_, 1...12, _) => LocalDate::ymd(year,Month::from_one(month),day),\n+             _ => None\n+        }\n+    }\n+\n+    /// Creates `LocalDate` from year, week number and day in week.\n+    pub fn from_yearday(year:i64, yearday:i64) -> Option<LocalDate> {\n+        match yearday {\n+            0...366 => {\n+                let jan1 = LocalDate::new(year, 1, 1).unwrap();\n+                let days = jan1.ymd.to_days_since_epoch().unwrap();\n+                Some(LocalDate::from_days_since_epoch(\n+                    days + yearday -1 - EPOCH_DIFFERENCE ))\n+            },\n+            _ => None\n+        }\n+    }\n+\n+    // /// Creates `LocalDate` from year, week number and day in week.","path":"src/local.rs","position":45,"original_position":45,"commit_id":"616656b9d500ebac49b119aa0578c77d49285e45","original_commit_id":"616656b9d500ebac49b119aa0578c77d49285e45","user":{"login":"ogham","id":503760,"avatar_url":"https://avatars.githubusercontent.com/u/503760?v=3","gravatar_id":"","url":"https://api.github.com/users/ogham","html_url":"https://github.com/ogham","followers_url":"https://api.github.com/users/ogham/followers","following_url":"https://api.github.com/users/ogham/following{/other_user}","gists_url":"https://api.github.com/users/ogham/gists{/gist_id}","starred_url":"https://api.github.com/users/ogham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogham/subscriptions","organizations_url":"https://api.github.com/users/ogham/orgs","repos_url":"https://api.github.com/users/ogham/repos","events_url":"https://api.github.com/users/ogham/events{/privacy}","received_events_url":"https://api.github.com/users/ogham/received_events","type":"User","site_admin":false},"body":"Double comment :rainbow: ","created_at":"2015-07-04T17:37:05Z","updated_at":"2015-07-04T17:37:05Z","html_url":"https://github.com/ogham/rust-datetime/pull/7#discussion_r33888935","pull_request_url":"https://api.github.com/repos/ogham/rust-datetime/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/ogham/rust-datetime/pulls/comments/33888935"},"html":{"href":"https://github.com/ogham/rust-datetime/pull/7#discussion_r33888935"},"pull_request":{"href":"https://api.github.com/repos/ogham/rust-datetime/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/ogham/rust-datetime/pulls/7","id":39163643,"html_url":"https://github.com/ogham/rust-datetime/pull/7","diff_url":"https://github.com/ogham/rust-datetime/pull/7.diff","patch_url":"https://github.com/ogham/rust-datetime/pull/7.patch","issue_url":"https://api.github.com/repos/ogham/rust-datetime/issues/7","number":7,"state":"open","locked":false,"title":"Feature/iso8601 parsing","user":{"login":"hoodie","id":260370,"avatar_url":"https://avatars.githubusercontent.com/u/260370?v=3","gravatar_id":"","url":"https://api.github.com/users/hoodie","html_url":"https://github.com/hoodie","followers_url":"https://api.github.com/users/hoodie/followers","following_url":"https://api.github.com/users/hoodie/following{/other_user}","gists_url":"https://api.github.com/users/hoodie/gists{/gist_id}","starred_url":"https://api.github.com/users/hoodie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoodie/subscriptions","organizations_url":"https://api.github.com/users/hoodie/orgs","repos_url":"https://api.github.com/users/hoodie/repos","events_url":"https://api.github.com/users/hoodie/events{/privacy}","received_events_url":"https://api.github.com/users/hoodie/received_events","type":"User","site_admin":false},"body":"Hi,\r\nI just wanted to let you know about the patch that I've been working on lately.\r\nIt is supposed to make it easier to manually create `LocalDate`/`LocalTime` objects. It also includes parsing of ISO-8601 formated strings.\r\nYou should not merge this yet, since it still does not implement timezones, but I wanted to give you some time to review this if you like.\r\n\r\nThank you","created_at":"2015-07-03T10:24:23Z","updated_at":"2015-07-04T17:37:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b344993166d8e286d20b5069f85b2d2682890ee0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ogham/rust-datetime/pulls/7/commits","review_comments_url":"https://api.github.com/repos/ogham/rust-datetime/pulls/7/comments","review_comment_url":"https://api.github.com/repos/ogham/rust-datetime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ogham/rust-datetime/issues/7/comments","statuses_url":"https://api.github.com/repos/ogham/rust-datetime/statuses/616656b9d500ebac49b119aa0578c77d49285e45","head":{"label":"hoodie:feature/iso8601_parsing","ref":"feature/iso8601_parsing","sha":"616656b9d500ebac49b119aa0578c77d49285e45","user":{"login":"hoodie","id":260370,"avatar_url":"https://avatars.githubusercontent.com/u/260370?v=3","gravatar_id":"","url":"https://api.github.com/users/hoodie","html_url":"https://github.com/hoodie","followers_url":"https://api.github.com/users/hoodie/followers","following_url":"https://api.github.com/users/hoodie/following{/other_user}","gists_url":"https://api.github.com/users/hoodie/gists{/gist_id}","starred_url":"https://api.github.com/users/hoodie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoodie/subscriptions","organizations_url":"https://api.github.com/users/hoodie/orgs","repos_url":"https://api.github.com/users/hoodie/repos","events_url":"https://api.github.com/users/hoodie/events{/privacy}","received_events_url":"https://api.github.com/users/hoodie/received_events","type":"User","site_admin":false},"repo":{"id":38138334,"name":"rust-datetime","full_name":"hoodie/rust-datetime","owner":{"login":"hoodie","id":260370,"avatar_url":"https://avatars.githubusercontent.com/u/260370?v=3","gravatar_id":"","url":"https://api.github.com/users/hoodie","html_url":"https://github.com/hoodie","followers_url":"https://api.github.com/users/hoodie/followers","following_url":"https://api.github.com/users/hoodie/following{/other_user}","gists_url":"https://api.github.com/users/hoodie/gists{/gist_id}","starred_url":"https://api.github.com/users/hoodie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoodie/subscriptions","organizations_url":"https://api.github.com/users/hoodie/orgs","repos_url":"https://api.github.com/users/hoodie/repos","events_url":"https://api.github.com/users/hoodie/events{/privacy}","received_events_url":"https://api.github.com/users/hoodie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hoodie/rust-datetime","description":"Dates and times library for Rust.","fork":true,"url":"https://api.github.com/repos/hoodie/rust-datetime","forks_url":"https://api.github.com/repos/hoodie/rust-datetime/forks","keys_url":"https://api.github.com/repos/hoodie/rust-datetime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoodie/rust-datetime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoodie/rust-datetime/teams","hooks_url":"https://api.github.com/repos/hoodie/rust-datetime/hooks","issue_events_url":"https://api.github.com/repos/hoodie/rust-datetime/issues/events{/number}","events_url":"https://api.github.com/repos/hoodie/rust-datetime/events","assignees_url":"https://api.github.com/repos/hoodie/rust-datetime/assignees{/user}","branches_url":"https://api.github.com/repos/hoodie/rust-datetime/branches{/branch}","tags_url":"https://api.github.com/repos/hoodie/rust-datetime/tags","blobs_url":"https://api.github.com/repos/hoodie/rust-datetime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoodie/rust-datetime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoodie/rust-datetime/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoodie/rust-datetime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoodie/rust-datetime/statuses/{sha}","languages_url":"https://api.github.com/repos/hoodie/rust-datetime/languages","stargazers_url":"https://api.github.com/repos/hoodie/rust-datetime/stargazers","contributors_url":"https://api.github.com/repos/hoodie/rust-datetime/contributors","subscribers_url":"https://api.github.com/repos/hoodie/rust-datetime/subscribers","subscription_url":"https://api.github.com/repos/hoodie/rust-datetime/subscription","commits_url":"https://api.github.com/repos/hoodie/rust-datetime/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoodie/rust-datetime/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoodie/rust-datetime/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoodie/rust-datetime/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoodie/rust-datetime/contents/{+path}","compare_url":"https://api.github.com/repos/hoodie/rust-datetime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoodie/rust-datetime/merges","archive_url":"https://api.github.com/repos/hoodie/rust-datetime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoodie/rust-datetime/downloads","issues_url":"https://api.github.com/repos/hoodie/rust-datetime/issues{/number}","pulls_url":"https://api.github.com/repos/hoodie/rust-datetime/pulls{/number}","milestones_url":"https://api.github.com/repos/hoodie/rust-datetime/milestones{/number}","notifications_url":"https://api.github.com/repos/hoodie/rust-datetime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoodie/rust-datetime/labels{/name}","releases_url":"https://api.github.com/repos/hoodie/rust-datetime/releases{/id}","created_at":"2015-06-26T23:11:53Z","updated_at":"2015-06-26T23:11:53Z","pushed_at":"2015-07-03T10:20:36Z","git_url":"git://github.com/hoodie/rust-datetime.git","ssh_url":"git@github.com:hoodie/rust-datetime.git","clone_url":"https://github.com/hoodie/rust-datetime.git","svn_url":"https://github.com/hoodie/rust-datetime","homepage":null,"size":397,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"ogham:master","ref":"master","sha":"d6a35300121f78f9d8db64dccbe6a1fd09268ac9","user":{"login":"ogham","id":503760,"avatar_url":"https://avatars.githubusercontent.com/u/503760?v=3","gravatar_id":"","url":"https://api.github.com/users/ogham","html_url":"https://github.com/ogham","followers_url":"https://api.github.com/users/ogham/followers","following_url":"https://api.github.com/users/ogham/following{/other_user}","gists_url":"https://api.github.com/users/ogham/gists{/gist_id}","starred_url":"https://api.github.com/users/ogham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogham/subscriptions","organizations_url":"https://api.github.com/users/ogham/orgs","repos_url":"https://api.github.com/users/ogham/repos","events_url":"https://api.github.com/users/ogham/events{/privacy}","received_events_url":"https://api.github.com/users/ogham/received_events","type":"User","site_admin":false},"repo":{"id":28747348,"name":"rust-datetime","full_name":"ogham/rust-datetime","owner":{"login":"ogham","id":503760,"avatar_url":"https://avatars.githubusercontent.com/u/503760?v=3","gravatar_id":"","url":"https://api.github.com/users/ogham","html_url":"https://github.com/ogham","followers_url":"https://api.github.com/users/ogham/followers","following_url":"https://api.github.com/users/ogham/following{/other_user}","gists_url":"https://api.github.com/users/ogham/gists{/gist_id}","starred_url":"https://api.github.com/users/ogham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogham/subscriptions","organizations_url":"https://api.github.com/users/ogham/orgs","repos_url":"https://api.github.com/users/ogham/repos","events_url":"https://api.github.com/users/ogham/events{/privacy}","received_events_url":"https://api.github.com/users/ogham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ogham/rust-datetime","description":"Dates and times library for Rust.","fork":false,"url":"https://api.github.com/repos/ogham/rust-datetime","forks_url":"https://api.github.com/repos/ogham/rust-datetime/forks","keys_url":"https://api.github.com/repos/ogham/rust-datetime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ogham/rust-datetime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ogham/rust-datetime/teams","hooks_url":"https://api.github.com/repos/ogham/rust-datetime/hooks","issue_events_url":"https://api.github.com/repos/ogham/rust-datetime/issues/events{/number}","events_url":"https://api.github.com/repos/ogham/rust-datetime/events","assignees_url":"https://api.github.com/repos/ogham/rust-datetime/assignees{/user}","branches_url":"https://api.github.com/repos/ogham/rust-datetime/branches{/branch}","tags_url":"https://api.github.com/repos/ogham/rust-datetime/tags","blobs_url":"https://api.github.com/repos/ogham/rust-datetime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ogham/rust-datetime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ogham/rust-datetime/git/refs{/sha}","trees_url":"https://api.github.com/repos/ogham/rust-datetime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ogham/rust-datetime/statuses/{sha}","languages_url":"https://api.github.com/repos/ogham/rust-datetime/languages","stargazers_url":"https://api.github.com/repos/ogham/rust-datetime/stargazers","contributors_url":"https://api.github.com/repos/ogham/rust-datetime/contributors","subscribers_url":"https://api.github.com/repos/ogham/rust-datetime/subscribers","subscription_url":"https://api.github.com/repos/ogham/rust-datetime/subscription","commits_url":"https://api.github.com/repos/ogham/rust-datetime/commits{/sha}","git_commits_url":"https://api.github.com/repos/ogham/rust-datetime/git/commits{/sha}","comments_url":"https://api.github.com/repos/ogham/rust-datetime/comments{/number}","issue_comment_url":"https://api.github.com/repos/ogham/rust-datetime/issues/comments{/number}","contents_url":"https://api.github.com/repos/ogham/rust-datetime/contents/{+path}","compare_url":"https://api.github.com/repos/ogham/rust-datetime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ogham/rust-datetime/merges","archive_url":"https://api.github.com/repos/ogham/rust-datetime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ogham/rust-datetime/downloads","issues_url":"https://api.github.com/repos/ogham/rust-datetime/issues{/number}","pulls_url":"https://api.github.com/repos/ogham/rust-datetime/pulls{/number}","milestones_url":"https://api.github.com/repos/ogham/rust-datetime/milestones{/number}","notifications_url":"https://api.github.com/repos/ogham/rust-datetime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ogham/rust-datetime/labels{/name}","releases_url":"https://api.github.com/repos/ogham/rust-datetime/releases{/id}","created_at":"2015-01-03T15:36:33Z","updated_at":"2015-06-26T11:27:34Z","pushed_at":"2015-07-03T10:24:23Z","git_url":"git://github.com/ogham/rust-datetime.git","ssh_url":"git@github.com:ogham/rust-datetime.git","clone_url":"https://github.com/ogham/rust-datetime.git","svn_url":"https://github.com/ogham/rust-datetime","homepage":null,"size":506,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ogham/rust-datetime/pulls/7"},"html":{"href":"https://github.com/ogham/rust-datetime/pull/7"},"issue":{"href":"https://api.github.com/repos/ogham/rust-datetime/issues/7"},"comments":{"href":"https://api.github.com/repos/ogham/rust-datetime/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/ogham/rust-datetime/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/ogham/rust-datetime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ogham/rust-datetime/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/ogham/rust-datetime/statuses/616656b9d500ebac49b119aa0578c77d49285e45"}}}}