{"action":"created","comment":{"url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/comments/27201900","id":27201900,"diff_hunk":"@@ -191,20 +194,342 @@ my %SHORT_BUSINESS_DAYS = (\n );\n \n \n-=head2 is_holiday( $year, $month, $day )\n+# sources:\n+#   http://base.garant.ru/4029129/\n+#   https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D0%B8\n+# region codes are from ISO 3166-2: https://ru.wikipedia.org/wiki/ISO_3166-2:RU\n+\n+my %REGIONAL_HOLIDAYS = (\n+    AD => {\n+        republic_day => {\n+            name => 'День образования Республики Адыгея',\n+            days => {\n+                2006 => '1005',\n+            },\n+        },\n+        eid_al_fitr => {\n+            name => 'Ураза-Байрам',\n+            days => {\n+                2006 => \\&_calc_eid_al_fitr_date,\n+            },\n+        },\n+    },\n+    AL => {\n+        tsagaan_sar => {\n+            name => 'Чага-Байрам',\n+            days => {\n+                2013 => _get_tabulator({ 2013 => '0217', 2014 => '0202', 2015 => '0222' }),","path":"lib/Date/Holidays/RU.pm","position":122,"original_position":121,"commit_id":"c148af8a50fdb21b4d7d97a88956539014cda97d","original_commit_id":"e9416efb0d4623c3db38f65dcdee78d807c596e5","user":{"login":"liosha","id":874688,"avatar_url":"https://avatars.githubusercontent.com/u/874688?v=3","gravatar_id":"","url":"https://api.github.com/users/liosha","html_url":"https://github.com/liosha","followers_url":"https://api.github.com/users/liosha/followers","following_url":"https://api.github.com/users/liosha/following{/other_user}","gists_url":"https://api.github.com/users/liosha/gists{/gist_id}","starred_url":"https://api.github.com/users/liosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liosha/subscriptions","organizations_url":"https://api.github.com/users/liosha/orgs","repos_url":"https://api.github.com/users/liosha/repos","events_url":"https://api.github.com/users/liosha/events{/privacy}","received_events_url":"https://api.github.com/users/liosha/received_events","type":"User","site_admin":false},"body":"Не аналогично.\r\nДля 2016 года этот вариант отдаст '0222' (что неправильно), а вариант с _get_tabulator выдаст ворнинг о неопределённом значении.\r\n\r\nА ещё _get_tabulator потенциально может формировать этот хеш из других структур, например из плоского списка дат. И у него предусмотрен фолбек на расчётную функцию, чтобы можно было получать предварительную дату, пока точная неизвестна.","created_at":"2015-03-26T10:33:13Z","updated_at":"2015-03-26T10:33:13Z","html_url":"https://github.com/nalobin/Date-Holidays-RU/pull/4#discussion_r27201900","pull_request_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/comments/27201900"},"html":{"href":"https://github.com/nalobin/Date-Holidays-RU/pull/4#discussion_r27201900"},"pull_request":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4","id":31591109,"html_url":"https://github.com/nalobin/Date-Holidays-RU/pull/4","diff_url":"https://github.com/nalobin/Date-Holidays-RU/pull/4.diff","patch_url":"https://github.com/nalobin/Date-Holidays-RU/pull/4.patch","issue_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues/4","number":4,"state":"open","locked":false,"title":"regional holidays","user":{"login":"liosha","id":874688,"avatar_url":"https://avatars.githubusercontent.com/u/874688?v=3","gravatar_id":"","url":"https://api.github.com/users/liosha","html_url":"https://github.com/liosha","followers_url":"https://api.github.com/users/liosha/followers","following_url":"https://api.github.com/users/liosha/following{/other_user}","gists_url":"https://api.github.com/users/liosha/gists{/gist_id}","starred_url":"https://api.github.com/users/liosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liosha/subscriptions","organizations_url":"https://api.github.com/users/liosha/orgs","repos_url":"https://api.github.com/users/liosha/repos","events_url":"https://api.github.com/users/liosha/events{/privacy}","received_events_url":"https://api.github.com/users/liosha/received_events","type":"User","site_admin":false},"body":"support for local holidays and some refactoring","created_at":"2015-03-20T06:29:34Z","updated_at":"2015-03-26T10:33:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f206431cf28407169c4de40ff4da49f5aa0670ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4/commits","review_comments_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4/comments","review_comment_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues/4/comments","statuses_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/statuses/c148af8a50fdb21b4d7d97a88956539014cda97d","head":{"label":"liosha:master","ref":"master","sha":"c148af8a50fdb21b4d7d97a88956539014cda97d","user":{"login":"liosha","id":874688,"avatar_url":"https://avatars.githubusercontent.com/u/874688?v=3","gravatar_id":"","url":"https://api.github.com/users/liosha","html_url":"https://github.com/liosha","followers_url":"https://api.github.com/users/liosha/followers","following_url":"https://api.github.com/users/liosha/following{/other_user}","gists_url":"https://api.github.com/users/liosha/gists{/gist_id}","starred_url":"https://api.github.com/users/liosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liosha/subscriptions","organizations_url":"https://api.github.com/users/liosha/orgs","repos_url":"https://api.github.com/users/liosha/repos","events_url":"https://api.github.com/users/liosha/events{/privacy}","received_events_url":"https://api.github.com/users/liosha/received_events","type":"User","site_admin":false},"repo":{"id":31671640,"name":"Date-Holidays-RU","full_name":"liosha/Date-Holidays-RU","owner":{"login":"liosha","id":874688,"avatar_url":"https://avatars.githubusercontent.com/u/874688?v=3","gravatar_id":"","url":"https://api.github.com/users/liosha","html_url":"https://github.com/liosha","followers_url":"https://api.github.com/users/liosha/followers","following_url":"https://api.github.com/users/liosha/following{/other_user}","gists_url":"https://api.github.com/users/liosha/gists{/gist_id}","starred_url":"https://api.github.com/users/liosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liosha/subscriptions","organizations_url":"https://api.github.com/users/liosha/orgs","repos_url":"https://api.github.com/users/liosha/repos","events_url":"https://api.github.com/users/liosha/events{/privacy}","received_events_url":"https://api.github.com/users/liosha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liosha/Date-Holidays-RU","description":"Determine Russian Federation official holidays and business days.","fork":true,"url":"https://api.github.com/repos/liosha/Date-Holidays-RU","forks_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/forks","keys_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/teams","hooks_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/hooks","issue_events_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/issues/events{/number}","events_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/events","assignees_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/assignees{/user}","branches_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/branches{/branch}","tags_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/tags","blobs_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/git/refs{/sha}","trees_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/statuses/{sha}","languages_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/languages","stargazers_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/stargazers","contributors_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/contributors","subscribers_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/subscribers","subscription_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/subscription","commits_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/commits{/sha}","git_commits_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/git/commits{/sha}","comments_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/comments{/number}","issue_comment_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/issues/comments{/number}","contents_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/contents/{+path}","compare_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/merges","archive_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/downloads","issues_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/issues{/number}","pulls_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/pulls{/number}","milestones_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/milestones{/number}","notifications_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/labels{/name}","releases_url":"https://api.github.com/repos/liosha/Date-Holidays-RU/releases{/id}","created_at":"2015-03-04T18:02:12Z","updated_at":"2015-03-26T06:49:21Z","pushed_at":"2015-03-26T06:49:21Z","git_url":"git://github.com/liosha/Date-Holidays-RU.git","ssh_url":"git@github.com:liosha/Date-Holidays-RU.git","clone_url":"https://github.com/liosha/Date-Holidays-RU.git","svn_url":"https://github.com/liosha/Date-Holidays-RU","homepage":null,"size":141,"stargazers_count":0,"watchers_count":0,"language":"Perl","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":"nalobin:master","ref":"master","sha":"85bbf09b51df0ea4380f1fc9e65f122b5baaf999","user":{"login":"nalobin","id":2346410,"avatar_url":"https://avatars.githubusercontent.com/u/2346410?v=3","gravatar_id":"","url":"https://api.github.com/users/nalobin","html_url":"https://github.com/nalobin","followers_url":"https://api.github.com/users/nalobin/followers","following_url":"https://api.github.com/users/nalobin/following{/other_user}","gists_url":"https://api.github.com/users/nalobin/gists{/gist_id}","starred_url":"https://api.github.com/users/nalobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalobin/subscriptions","organizations_url":"https://api.github.com/users/nalobin/orgs","repos_url":"https://api.github.com/users/nalobin/repos","events_url":"https://api.github.com/users/nalobin/events{/privacy}","received_events_url":"https://api.github.com/users/nalobin/received_events","type":"User","site_admin":false},"repo":{"id":27119227,"name":"Date-Holidays-RU","full_name":"nalobin/Date-Holidays-RU","owner":{"login":"nalobin","id":2346410,"avatar_url":"https://avatars.githubusercontent.com/u/2346410?v=3","gravatar_id":"","url":"https://api.github.com/users/nalobin","html_url":"https://github.com/nalobin","followers_url":"https://api.github.com/users/nalobin/followers","following_url":"https://api.github.com/users/nalobin/following{/other_user}","gists_url":"https://api.github.com/users/nalobin/gists{/gist_id}","starred_url":"https://api.github.com/users/nalobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalobin/subscriptions","organizations_url":"https://api.github.com/users/nalobin/orgs","repos_url":"https://api.github.com/users/nalobin/repos","events_url":"https://api.github.com/users/nalobin/events{/privacy}","received_events_url":"https://api.github.com/users/nalobin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nalobin/Date-Holidays-RU","description":"Determine Russian Federation official holidays and business days.","fork":false,"url":"https://api.github.com/repos/nalobin/Date-Holidays-RU","forks_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/forks","keys_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/teams","hooks_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/hooks","issue_events_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues/events{/number}","events_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/events","assignees_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/assignees{/user}","branches_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/branches{/branch}","tags_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/tags","blobs_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/git/refs{/sha}","trees_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/statuses/{sha}","languages_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/languages","stargazers_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/stargazers","contributors_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/contributors","subscribers_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/subscribers","subscription_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/subscription","commits_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/commits{/sha}","git_commits_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/git/commits{/sha}","comments_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/comments{/number}","issue_comment_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues/comments{/number}","contents_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/contents/{+path}","compare_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/merges","archive_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/downloads","issues_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues{/number}","pulls_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls{/number}","milestones_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/milestones{/number}","notifications_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/labels{/name}","releases_url":"https://api.github.com/repos/nalobin/Date-Holidays-RU/releases{/id}","created_at":"2014-11-25T09:51:10Z","updated_at":"2015-03-18T18:22:34Z","pushed_at":"2015-03-26T06:49:22Z","git_url":"git://github.com/nalobin/Date-Holidays-RU.git","ssh_url":"git@github.com:nalobin/Date-Holidays-RU.git","clone_url":"https://github.com/nalobin/Date-Holidays-RU.git","svn_url":"https://github.com/nalobin/Date-Holidays-RU","homepage":null,"size":234,"stargazers_count":0,"watchers_count":0,"language":"Perl","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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4"},"html":{"href":"https://github.com/nalobin/Date-Holidays-RU/pull/4"},"issue":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues/4"},"comments":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/nalobin/Date-Holidays-RU/statuses/c148af8a50fdb21b4d7d97a88956539014cda97d"}}}}