{"action":"created","comment":{"url":"https://api.github.com/repos/regattadev/dates/pulls/comments/65904749","id":65904749,"diff_hunk":"@@ -120,4 +120,54 @@ public function isWeekend()\n     {\n         return ($this->numeric(\"N\") >= Days::SATURDAY);\n     }\n+\n+    /**\n+     * Get Next.\n+     *\n+     * Get a date object for the next occurence of a specified day.\n+     *\n+     * @param  int $day The numeric representation of the day.\n+     *\n+     * @return Date object for the requested day.\n+     */\n+    public function getNext($day)\n+    {\n+        $date = $this;\n+\n+        # if today matches requested day, move forward a day to ensure we don't return today\n+        if ($date->numeric(\"N\") == $day) {","path":"src/Traits/DayHelpers.php","position":19,"original_position":19,"commit_id":"f328afe0384f2aa154b8b1a6f36825911142edca","original_commit_id":"f328afe0384f2aa154b8b1a6f36825911142edca","user":{"login":"duncan3dc","id":546811,"avatar_url":"https://avatars.githubusercontent.com/u/546811?v=3","gravatar_id":"","url":"https://api.github.com/users/duncan3dc","html_url":"https://github.com/duncan3dc","followers_url":"https://api.github.com/users/duncan3dc/followers","following_url":"https://api.github.com/users/duncan3dc/following{/other_user}","gists_url":"https://api.github.com/users/duncan3dc/gists{/gist_id}","starred_url":"https://api.github.com/users/duncan3dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncan3dc/subscriptions","organizations_url":"https://api.github.com/users/duncan3dc/orgs","repos_url":"https://api.github.com/users/duncan3dc/repos","events_url":"https://api.github.com/users/duncan3dc/events{/privacy}","received_events_url":"https://api.github.com/users/duncan3dc/received_events","type":"User","site_admin":false},"body":"Doesn't this contradict what @tomcphr was doing?\r\nI'm less keen now I've realised there's 2 ways of doing it :confused: ","created_at":"2016-06-06T14:56:10Z","updated_at":"2016-06-06T14:56:10Z","html_url":"https://github.com/regattadev/dates/pull/18#discussion_r65904749","pull_request_url":"https://api.github.com/repos/regattadev/dates/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/regattadev/dates/pulls/comments/65904749"},"html":{"href":"https://github.com/regattadev/dates/pull/18#discussion_r65904749"},"pull_request":{"href":"https://api.github.com/repos/regattadev/dates/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/regattadev/dates/pulls/18","id":72722538,"html_url":"https://github.com/regattadev/dates/pull/18","diff_url":"https://github.com/regattadev/dates/pull/18.diff","patch_url":"https://github.com/regattadev/dates/pull/18.patch","issue_url":"https://api.github.com/repos/regattadev/dates/issues/18","number":18,"state":"open","locked":false,"title":"Added GetNext and GetPrevious Methods","user":{"login":"regatta-ajl","id":6781287,"avatar_url":"https://avatars.githubusercontent.com/u/6781287?v=3","gravatar_id":"","url":"https://api.github.com/users/regatta-ajl","html_url":"https://github.com/regatta-ajl","followers_url":"https://api.github.com/users/regatta-ajl/followers","following_url":"https://api.github.com/users/regatta-ajl/following{/other_user}","gists_url":"https://api.github.com/users/regatta-ajl/gists{/gist_id}","starred_url":"https://api.github.com/users/regatta-ajl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regatta-ajl/subscriptions","organizations_url":"https://api.github.com/users/regatta-ajl/orgs","repos_url":"https://api.github.com/users/regatta-ajl/repos","events_url":"https://api.github.com/users/regatta-ajl/events{/privacy}","received_events_url":"https://api.github.com/users/regatta-ajl/received_events","type":"User","site_admin":false},"body":"Added support for getting instance of the next occurring *day*, or previous occurring *day*, specified by the user.\r\n\r\nCC: @tomcphr ","created_at":"2016-06-06T14:51:53Z","updated_at":"2016-06-06T14:56:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f520c4c994cf1fd09cd02eef5fc27f8a4ac1b25b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/regattadev/dates/pulls/18/commits","review_comments_url":"https://api.github.com/repos/regattadev/dates/pulls/18/comments","review_comment_url":"https://api.github.com/repos/regattadev/dates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/regattadev/dates/issues/18/comments","statuses_url":"https://api.github.com/repos/regattadev/dates/statuses/f328afe0384f2aa154b8b1a6f36825911142edca","head":{"label":"regattadev:get-next-get-previous-day","ref":"get-next-get-previous-day","sha":"f328afe0384f2aa154b8b1a6f36825911142edca","user":{"login":"regattadev","id":4959742,"avatar_url":"https://avatars.githubusercontent.com/u/4959742?v=3","gravatar_id":"","url":"https://api.github.com/users/regattadev","html_url":"https://github.com/regattadev","followers_url":"https://api.github.com/users/regattadev/followers","following_url":"https://api.github.com/users/regattadev/following{/other_user}","gists_url":"https://api.github.com/users/regattadev/gists{/gist_id}","starred_url":"https://api.github.com/users/regattadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regattadev/subscriptions","organizations_url":"https://api.github.com/users/regattadev/orgs","repos_url":"https://api.github.com/users/regattadev/repos","events_url":"https://api.github.com/users/regattadev/events{/privacy}","received_events_url":"https://api.github.com/users/regattadev/received_events","type":"Organization","site_admin":false},"repo":{"id":28827939,"name":"dates","full_name":"regattadev/dates","owner":{"login":"regattadev","id":4959742,"avatar_url":"https://avatars.githubusercontent.com/u/4959742?v=3","gravatar_id":"","url":"https://api.github.com/users/regattadev","html_url":"https://github.com/regattadev","followers_url":"https://api.github.com/users/regattadev/followers","following_url":"https://api.github.com/users/regattadev/following{/other_user}","gists_url":"https://api.github.com/users/regattadev/gists{/gist_id}","starred_url":"https://api.github.com/users/regattadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regattadev/subscriptions","organizations_url":"https://api.github.com/users/regattadev/orgs","repos_url":"https://api.github.com/users/regattadev/repos","events_url":"https://api.github.com/users/regattadev/events{/privacy}","received_events_url":"https://api.github.com/users/regattadev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/regattadev/dates","description":"Work with dates and ranges, seasons, financial periods, etc","fork":false,"url":"https://api.github.com/repos/regattadev/dates","forks_url":"https://api.github.com/repos/regattadev/dates/forks","keys_url":"https://api.github.com/repos/regattadev/dates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/regattadev/dates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/regattadev/dates/teams","hooks_url":"https://api.github.com/repos/regattadev/dates/hooks","issue_events_url":"https://api.github.com/repos/regattadev/dates/issues/events{/number}","events_url":"https://api.github.com/repos/regattadev/dates/events","assignees_url":"https://api.github.com/repos/regattadev/dates/assignees{/user}","branches_url":"https://api.github.com/repos/regattadev/dates/branches{/branch}","tags_url":"https://api.github.com/repos/regattadev/dates/tags","blobs_url":"https://api.github.com/repos/regattadev/dates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/regattadev/dates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/regattadev/dates/git/refs{/sha}","trees_url":"https://api.github.com/repos/regattadev/dates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/regattadev/dates/statuses/{sha}","languages_url":"https://api.github.com/repos/regattadev/dates/languages","stargazers_url":"https://api.github.com/repos/regattadev/dates/stargazers","contributors_url":"https://api.github.com/repos/regattadev/dates/contributors","subscribers_url":"https://api.github.com/repos/regattadev/dates/subscribers","subscription_url":"https://api.github.com/repos/regattadev/dates/subscription","commits_url":"https://api.github.com/repos/regattadev/dates/commits{/sha}","git_commits_url":"https://api.github.com/repos/regattadev/dates/git/commits{/sha}","comments_url":"https://api.github.com/repos/regattadev/dates/comments{/number}","issue_comment_url":"https://api.github.com/repos/regattadev/dates/issues/comments{/number}","contents_url":"https://api.github.com/repos/regattadev/dates/contents/{+path}","compare_url":"https://api.github.com/repos/regattadev/dates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/regattadev/dates/merges","archive_url":"https://api.github.com/repos/regattadev/dates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/regattadev/dates/downloads","issues_url":"https://api.github.com/repos/regattadev/dates/issues{/number}","pulls_url":"https://api.github.com/repos/regattadev/dates/pulls{/number}","milestones_url":"https://api.github.com/repos/regattadev/dates/milestones{/number}","notifications_url":"https://api.github.com/repos/regattadev/dates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/regattadev/dates/labels{/name}","releases_url":"https://api.github.com/repos/regattadev/dates/releases{/id}","deployments_url":"https://api.github.com/repos/regattadev/dates/deployments","created_at":"2015-01-05T19:31:15Z","updated_at":"2016-03-07T10:36:15Z","pushed_at":"2016-06-06T14:51:53Z","git_url":"git://github.com/regattadev/dates.git","ssh_url":"git@github.com:regattadev/dates.git","clone_url":"https://github.com/regattadev/dates.git","svn_url":"https://github.com/regattadev/dates","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"regattadev:master","ref":"master","sha":"10553baf3db79ecd683eeefa14efe0984ee3def6","user":{"login":"regattadev","id":4959742,"avatar_url":"https://avatars.githubusercontent.com/u/4959742?v=3","gravatar_id":"","url":"https://api.github.com/users/regattadev","html_url":"https://github.com/regattadev","followers_url":"https://api.github.com/users/regattadev/followers","following_url":"https://api.github.com/users/regattadev/following{/other_user}","gists_url":"https://api.github.com/users/regattadev/gists{/gist_id}","starred_url":"https://api.github.com/users/regattadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regattadev/subscriptions","organizations_url":"https://api.github.com/users/regattadev/orgs","repos_url":"https://api.github.com/users/regattadev/repos","events_url":"https://api.github.com/users/regattadev/events{/privacy}","received_events_url":"https://api.github.com/users/regattadev/received_events","type":"Organization","site_admin":false},"repo":{"id":28827939,"name":"dates","full_name":"regattadev/dates","owner":{"login":"regattadev","id":4959742,"avatar_url":"https://avatars.githubusercontent.com/u/4959742?v=3","gravatar_id":"","url":"https://api.github.com/users/regattadev","html_url":"https://github.com/regattadev","followers_url":"https://api.github.com/users/regattadev/followers","following_url":"https://api.github.com/users/regattadev/following{/other_user}","gists_url":"https://api.github.com/users/regattadev/gists{/gist_id}","starred_url":"https://api.github.com/users/regattadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regattadev/subscriptions","organizations_url":"https://api.github.com/users/regattadev/orgs","repos_url":"https://api.github.com/users/regattadev/repos","events_url":"https://api.github.com/users/regattadev/events{/privacy}","received_events_url":"https://api.github.com/users/regattadev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/regattadev/dates","description":"Work with dates and ranges, seasons, financial periods, etc","fork":false,"url":"https://api.github.com/repos/regattadev/dates","forks_url":"https://api.github.com/repos/regattadev/dates/forks","keys_url":"https://api.github.com/repos/regattadev/dates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/regattadev/dates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/regattadev/dates/teams","hooks_url":"https://api.github.com/repos/regattadev/dates/hooks","issue_events_url":"https://api.github.com/repos/regattadev/dates/issues/events{/number}","events_url":"https://api.github.com/repos/regattadev/dates/events","assignees_url":"https://api.github.com/repos/regattadev/dates/assignees{/user}","branches_url":"https://api.github.com/repos/regattadev/dates/branches{/branch}","tags_url":"https://api.github.com/repos/regattadev/dates/tags","blobs_url":"https://api.github.com/repos/regattadev/dates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/regattadev/dates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/regattadev/dates/git/refs{/sha}","trees_url":"https://api.github.com/repos/regattadev/dates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/regattadev/dates/statuses/{sha}","languages_url":"https://api.github.com/repos/regattadev/dates/languages","stargazers_url":"https://api.github.com/repos/regattadev/dates/stargazers","contributors_url":"https://api.github.com/repos/regattadev/dates/contributors","subscribers_url":"https://api.github.com/repos/regattadev/dates/subscribers","subscription_url":"https://api.github.com/repos/regattadev/dates/subscription","commits_url":"https://api.github.com/repos/regattadev/dates/commits{/sha}","git_commits_url":"https://api.github.com/repos/regattadev/dates/git/commits{/sha}","comments_url":"https://api.github.com/repos/regattadev/dates/comments{/number}","issue_comment_url":"https://api.github.com/repos/regattadev/dates/issues/comments{/number}","contents_url":"https://api.github.com/repos/regattadev/dates/contents/{+path}","compare_url":"https://api.github.com/repos/regattadev/dates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/regattadev/dates/merges","archive_url":"https://api.github.com/repos/regattadev/dates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/regattadev/dates/downloads","issues_url":"https://api.github.com/repos/regattadev/dates/issues{/number}","pulls_url":"https://api.github.com/repos/regattadev/dates/pulls{/number}","milestones_url":"https://api.github.com/repos/regattadev/dates/milestones{/number}","notifications_url":"https://api.github.com/repos/regattadev/dates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/regattadev/dates/labels{/name}","releases_url":"https://api.github.com/repos/regattadev/dates/releases{/id}","deployments_url":"https://api.github.com/repos/regattadev/dates/deployments","created_at":"2015-01-05T19:31:15Z","updated_at":"2016-03-07T10:36:15Z","pushed_at":"2016-06-06T14:51:53Z","git_url":"git://github.com/regattadev/dates.git","ssh_url":"git@github.com:regattadev/dates.git","clone_url":"https://github.com/regattadev/dates.git","svn_url":"https://github.com/regattadev/dates","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/regattadev/dates/pulls/18"},"html":{"href":"https://github.com/regattadev/dates/pull/18"},"issue":{"href":"https://api.github.com/repos/regattadev/dates/issues/18"},"comments":{"href":"https://api.github.com/repos/regattadev/dates/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/regattadev/dates/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/regattadev/dates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/regattadev/dates/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/regattadev/dates/statuses/f328afe0384f2aa154b8b1a6f36825911142edca"}}}}
{"actor":{"display_login":"duncan3dc"}}