{"action":"opened","number":32,"pull_request":{"url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/32","id":46881058,"html_url":"https://github.com/BrandwatchLtd/daterangepicker/pull/32","diff_url":"https://github.com/BrandwatchLtd/daterangepicker/pull/32.diff","patch_url":"https://github.com/BrandwatchLtd/daterangepicker/pull/32.patch","issue_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues/32","number":32,"state":"open","locked":false,"title":"CHAN-2346 Add 12 hours to this.monthToDisplay","user":{"login":"ingdir","id":192221,"avatar_url":"https://avatars.githubusercontent.com/u/192221?v=3","gravatar_id":"","url":"https://api.github.com/users/ingdir","html_url":"https://github.com/ingdir","followers_url":"https://api.github.com/users/ingdir/followers","following_url":"https://api.github.com/users/ingdir/following{/other_user}","gists_url":"https://api.github.com/users/ingdir/gists{/gist_id}","starred_url":"https://api.github.com/users/ingdir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingdir/subscriptions","organizations_url":"https://api.github.com/users/ingdir/orgs","repos_url":"https://api.github.com/users/ingdir/repos","events_url":"https://api.github.com/users/ingdir/events{/privacy}","received_events_url":"https://api.github.com/users/ingdir/received_events","type":"User","site_admin":false},"body":"This is yet another approach to solve the problem described in CHAN-2346.\r\n\r\nIf we hit an \"impossible timestamp\" (currently only happens for Egypt timezone), `moment` shifts the hours offset to the nearest \"allowed\" moment, and for Egypt we may end up on the same month/day. This is contradictory to the `moment` docs that guarantee the hours offset to be preserved in case of `add/.subtract` for days/months; in this rare case, however, the specific hours offset is \"illegal\" so it gets shifted.\r\n\r\nTo be protected from accidental time shifts made by moment for \"impossible datestamps\", we add 12 hours to the initial object representing the current month. If hours change (either way), the datestamp still remain on the same day/month (compared to previous behaviour where hours were 0).\r\n\r\nOnce moment shifts the hours, it also moved the date instance \"away\" from hitting the \"impossible timestamp\" the second time, and we assume no daylight adjustments will exceed 12 hours (thus the \"magic number\" 12). Smaller values like 3 or 4 would also work.","created_at":"2015-10-06T09:39:10Z","updated_at":"2015-10-06T09:39:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/32/commits","review_comments_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/32/comments","review_comment_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues/32/comments","statuses_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/statuses/c0a550310e08a701ecfd89bdeee547c86c54061f","head":{"label":"ingdir:CHAN-2346-alt","ref":"CHAN-2346-alt","sha":"c0a550310e08a701ecfd89bdeee547c86c54061f","user":{"login":"ingdir","id":192221,"avatar_url":"https://avatars.githubusercontent.com/u/192221?v=3","gravatar_id":"","url":"https://api.github.com/users/ingdir","html_url":"https://github.com/ingdir","followers_url":"https://api.github.com/users/ingdir/followers","following_url":"https://api.github.com/users/ingdir/following{/other_user}","gists_url":"https://api.github.com/users/ingdir/gists{/gist_id}","starred_url":"https://api.github.com/users/ingdir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingdir/subscriptions","organizations_url":"https://api.github.com/users/ingdir/orgs","repos_url":"https://api.github.com/users/ingdir/repos","events_url":"https://api.github.com/users/ingdir/events{/privacy}","received_events_url":"https://api.github.com/users/ingdir/received_events","type":"User","site_admin":false},"repo":{"id":43070539,"name":"daterangepicker","full_name":"ingdir/daterangepicker","owner":{"login":"ingdir","id":192221,"avatar_url":"https://avatars.githubusercontent.com/u/192221?v=3","gravatar_id":"","url":"https://api.github.com/users/ingdir","html_url":"https://github.com/ingdir","followers_url":"https://api.github.com/users/ingdir/followers","following_url":"https://api.github.com/users/ingdir/following{/other_user}","gists_url":"https://api.github.com/users/ingdir/gists{/gist_id}","starred_url":"https://api.github.com/users/ingdir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingdir/subscriptions","organizations_url":"https://api.github.com/users/ingdir/orgs","repos_url":"https://api.github.com/users/ingdir/repos","events_url":"https://api.github.com/users/ingdir/events{/privacy}","received_events_url":"https://api.github.com/users/ingdir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ingdir/daterangepicker","description":"very simple date range picker, using moment.js","fork":true,"url":"https://api.github.com/repos/ingdir/daterangepicker","forks_url":"https://api.github.com/repos/ingdir/daterangepicker/forks","keys_url":"https://api.github.com/repos/ingdir/daterangepicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ingdir/daterangepicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ingdir/daterangepicker/teams","hooks_url":"https://api.github.com/repos/ingdir/daterangepicker/hooks","issue_events_url":"https://api.github.com/repos/ingdir/daterangepicker/issues/events{/number}","events_url":"https://api.github.com/repos/ingdir/daterangepicker/events","assignees_url":"https://api.github.com/repos/ingdir/daterangepicker/assignees{/user}","branches_url":"https://api.github.com/repos/ingdir/daterangepicker/branches{/branch}","tags_url":"https://api.github.com/repos/ingdir/daterangepicker/tags","blobs_url":"https://api.github.com/repos/ingdir/daterangepicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ingdir/daterangepicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ingdir/daterangepicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ingdir/daterangepicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ingdir/daterangepicker/statuses/{sha}","languages_url":"https://api.github.com/repos/ingdir/daterangepicker/languages","stargazers_url":"https://api.github.com/repos/ingdir/daterangepicker/stargazers","contributors_url":"https://api.github.com/repos/ingdir/daterangepicker/contributors","subscribers_url":"https://api.github.com/repos/ingdir/daterangepicker/subscribers","subscription_url":"https://api.github.com/repos/ingdir/daterangepicker/subscription","commits_url":"https://api.github.com/repos/ingdir/daterangepicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ingdir/daterangepicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ingdir/daterangepicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ingdir/daterangepicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ingdir/daterangepicker/contents/{+path}","compare_url":"https://api.github.com/repos/ingdir/daterangepicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ingdir/daterangepicker/merges","archive_url":"https://api.github.com/repos/ingdir/daterangepicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ingdir/daterangepicker/downloads","issues_url":"https://api.github.com/repos/ingdir/daterangepicker/issues{/number}","pulls_url":"https://api.github.com/repos/ingdir/daterangepicker/pulls{/number}","milestones_url":"https://api.github.com/repos/ingdir/daterangepicker/milestones{/number}","notifications_url":"https://api.github.com/repos/ingdir/daterangepicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ingdir/daterangepicker/labels{/name}","releases_url":"https://api.github.com/repos/ingdir/daterangepicker/releases{/id}","created_at":"2015-09-24T14:05:08Z","updated_at":"2015-09-24T14:05:09Z","pushed_at":"2015-10-06T09:30:33Z","git_url":"git://github.com/ingdir/daterangepicker.git","ssh_url":"git@github.com:ingdir/daterangepicker.git","clone_url":"https://github.com/ingdir/daterangepicker.git","svn_url":"https://github.com/ingdir/daterangepicker","homepage":null,"size":445,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"BrandwatchLtd:master","ref":"master","sha":"e843a2dab74161453655e353c99a84fcd44f50b8","user":{"login":"BrandwatchLtd","id":807036,"avatar_url":"https://avatars.githubusercontent.com/u/807036?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandwatchLtd","html_url":"https://github.com/BrandwatchLtd","followers_url":"https://api.github.com/users/BrandwatchLtd/followers","following_url":"https://api.github.com/users/BrandwatchLtd/following{/other_user}","gists_url":"https://api.github.com/users/BrandwatchLtd/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandwatchLtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandwatchLtd/subscriptions","organizations_url":"https://api.github.com/users/BrandwatchLtd/orgs","repos_url":"https://api.github.com/users/BrandwatchLtd/repos","events_url":"https://api.github.com/users/BrandwatchLtd/events{/privacy}","received_events_url":"https://api.github.com/users/BrandwatchLtd/received_events","type":"Organization","site_admin":false},"repo":{"id":7559420,"name":"daterangepicker","full_name":"BrandwatchLtd/daterangepicker","owner":{"login":"BrandwatchLtd","id":807036,"avatar_url":"https://avatars.githubusercontent.com/u/807036?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandwatchLtd","html_url":"https://github.com/BrandwatchLtd","followers_url":"https://api.github.com/users/BrandwatchLtd/followers","following_url":"https://api.github.com/users/BrandwatchLtd/following{/other_user}","gists_url":"https://api.github.com/users/BrandwatchLtd/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandwatchLtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandwatchLtd/subscriptions","organizations_url":"https://api.github.com/users/BrandwatchLtd/orgs","repos_url":"https://api.github.com/users/BrandwatchLtd/repos","events_url":"https://api.github.com/users/BrandwatchLtd/events{/privacy}","received_events_url":"https://api.github.com/users/BrandwatchLtd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BrandwatchLtd/daterangepicker","description":"very simple date range picker, using moment.js","fork":false,"url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker","forks_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/forks","keys_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/teams","hooks_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/hooks","issue_events_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues/events{/number}","events_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/events","assignees_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/assignees{/user}","branches_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/branches{/branch}","tags_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/tags","blobs_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/statuses/{sha}","languages_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/languages","stargazers_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/stargazers","contributors_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/contributors","subscribers_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/subscribers","subscription_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/subscription","commits_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/contents/{+path}","compare_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/merges","archive_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/downloads","issues_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues{/number}","pulls_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls{/number}","milestones_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/milestones{/number}","notifications_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/labels{/name}","releases_url":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/releases{/id}","created_at":"2013-01-11T12:20:32Z","updated_at":"2014-10-03T10:01:58Z","pushed_at":"2015-10-06T09:27:35Z","git_url":"git://github.com/BrandwatchLtd/daterangepicker.git","ssh_url":"git@github.com:BrandwatchLtd/daterangepicker.git","clone_url":"https://github.com/BrandwatchLtd/daterangepicker.git","svn_url":"https://github.com/BrandwatchLtd/daterangepicker","homepage":null,"size":975,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":5,"forks":12,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/32"},"html":{"href":"https://github.com/BrandwatchLtd/daterangepicker/pull/32"},"issue":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues/32"},"comments":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/BrandwatchLtd/daterangepicker/statuses/c0a550310e08a701ecfd89bdeee547c86c54061f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":12,"deletions":19,"changed_files":2}}