{"action":"created","comment":{"url":"https://api.github.com/repos/ellismg/coreclr/pulls/comments/38967819","id":38967819,"diff_hunk":"@@ -112,41 +123,117 @@ const char* GetCalendarName(CalendarId calendarId)\n \tswitch (calendarId)\n \t{\n \t\tcase JAPAN:\n-\t\t\treturn \"japanese\";\n+\t\t\treturn JAPANESE_NAME;\n \t\tcase THAI:\n-\t\t\treturn \"buddhist\";\n+\t\t\treturn BUDDHIST_NAME;\n \t\tcase HEBREW:\n-\t\t\treturn \"hebrew\";\n-\t\tcase CHINESELUNISOLAR:\n-\t\tcase KOREANLUNISOLAR:\n-\t\tcase JAPANESELUNISOLAR:\n-\t\tcase TAIWANLUNISOLAR:\n-\t\t\treturn \"chinese\";\n+\t\t\treturn HEBREW_NAME;\n+\t\tcase KOREA:\n+\t\t\treturn DANGI_NAME;\n \t\tcase PERSIAN:\n-\t\t\treturn \"persian\";\n+\t\t\treturn PERSIAN_NAME;\n \t\tcase HIJRI:\n+\t\t\treturn ISLAMIC_NAME;\n \t\tcase UMALQURA:\n-\t\t\treturn \"islamic\";\n+\t\t\treturn ISLAMIC_UMALQURA_NAME;\n+\t\tcase TAIWAN:\n+\t\t\treturn ROC_NAME;\n \t\tcase GREGORIAN:\n \t\tcase GREGORIAN_US:\n \t\tcase GREGORIAN_ARABIC:\n \t\tcase GREGORIAN_ME_FRENCH:\n \t\tcase GREGORIAN_XLIT_ENGLISH:\n \t\tcase GREGORIAN_XLIT_FRENCH:\n-\t\tcase KOREA:\n \t\tcase JULIAN:\n \t\tcase LUNAR_ETO_CHN:\n \t\tcase LUNAR_ETO_KOR:\n \t\tcase LUNAR_ETO_ROKUYOU:\n \t\tcase SAKA:\n-\t\tcase TAIWAN:\n+\t\t// don't support the lunisolar calendars until we have a solid understanding\n+\t\t// of how they map to the ICU/CLDR calendars\n+\t\tcase CHINESELUNISOLAR:\n+\t\tcase KOREANLUNISOLAR:\n+\t\tcase JAPANESELUNISOLAR:\n+\t\tcase TAIWANLUNISOLAR:\n \t\tdefault:\n-\t\t\treturn \"gregorian\";\n+\t\t\treturn GREGORIAN_NAME;\n \t}\n }\n \n /*\n Function:\n+GetCalendarId\n+\n+Gets the associated CalendarId for the ICU calendar name.\n+*/\n+CalendarId GetCalendarId(const char* calendarName)\n+{\n+\tif (strcasecmp(calendarName, GREGORIAN_NAME) == 0)\n+\t\t//TODO: what about the other gregorian types?\n+\t\treturn GREGORIAN;\n+\telse if (strcasecmp(calendarName, JAPANESE_NAME) == 0)\n+\t\treturn JAPAN;\n+\telse if (strcasecmp(calendarName, BUDDHIST_NAME) == 0)\n+\t\treturn THAI;\n+\telse if (strcasecmp(calendarName, HEBREW_NAME) == 0)\n+\t\treturn HEBREW;\n+\telse if (strcasecmp(calendarName, DANGI_NAME) == 0)\n+\t\treturn KOREA;\n+\telse if (strcasecmp(calendarName, PERSIAN_NAME) == 0)\n+\t\treturn PERSIAN;\n+\telse if (strcasecmp(calendarName, ISLAMIC_NAME) == 0)\n+\t\treturn HIJRI;\n+\telse if (strcasecmp(calendarName, ISLAMIC_UMALQURA_NAME) == 0)\n+\t\treturn UMALQURA;\n+\telse if (strcasecmp(calendarName, ROC_NAME) == 0)\n+\t\treturn TAIWAN;","path":"src/corefx/System.Globalization.Native/calendarData.cpp","position":110,"original_position":110,"commit_id":"9db69267cd2607f34bbfcad1df5098e54fb0c274","original_commit_id":"9db69267cd2607f34bbfcad1df5098e54fb0c274","user":{"login":"tarekgh","id":10833894,"avatar_url":"https://avatars.githubusercontent.com/u/10833894?v=3","gravatar_id":"","url":"https://api.github.com/users/tarekgh","html_url":"https://github.com/tarekgh","followers_url":"https://api.github.com/users/tarekgh/followers","following_url":"https://api.github.com/users/tarekgh/following{/other_user}","gists_url":"https://api.github.com/users/tarekgh/gists{/gist_id}","starred_url":"https://api.github.com/users/tarekgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarekgh/subscriptions","organizations_url":"https://api.github.com/users/tarekgh/orgs","repos_url":"https://api.github.com/users/tarekgh/repos","events_url":"https://api.github.com/users/tarekgh/events{/privacy}","received_events_url":"https://api.github.com/users/tarekgh/received_events","type":"User","site_admin":false},"body":"Just to confirm, does Taiwan calendar is going to be used with the Chinese cultures? like zh-CN for instance? if so, then this is wrong as this is a geopolitical issue. I assume we'll use Gregorian calendar for Chinese cultures till we figure how we'll support the Chinese calendar","created_at":"2015-09-08T19:18:21Z","updated_at":"2015-09-08T19:18:21Z","html_url":"https://github.com/ellismg/coreclr/pull/5#discussion_r38967819","pull_request_url":"https://api.github.com/repos/ellismg/coreclr/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/ellismg/coreclr/pulls/comments/38967819"},"html":{"href":"https://github.com/ellismg/coreclr/pull/5#discussion_r38967819"},"pull_request":{"href":"https://api.github.com/repos/ellismg/coreclr/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/ellismg/coreclr/pulls/5","id":44165741,"html_url":"https://github.com/ellismg/coreclr/pull/5","diff_url":"https://github.com/ellismg/coreclr/pull/5.diff","patch_url":"https://github.com/ellismg/coreclr/pull/5.patch","issue_url":"https://api.github.com/repos/ellismg/coreclr/issues/5","number":5,"state":"open","locked":false,"title":"Implement CalendarData.GetCalendars and JapaneseCalendar eras","user":{"login":"eerhardt","id":8291187,"avatar_url":"https://avatars.githubusercontent.com/u/8291187?v=3","gravatar_id":"","url":"https://api.github.com/users/eerhardt","html_url":"https://github.com/eerhardt","followers_url":"https://api.github.com/users/eerhardt/followers","following_url":"https://api.github.com/users/eerhardt/following{/other_user}","gists_url":"https://api.github.com/users/eerhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/eerhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eerhardt/subscriptions","organizations_url":"https://api.github.com/users/eerhardt/orgs","repos_url":"https://api.github.com/users/eerhardt/repos","events_url":"https://api.github.com/users/eerhardt/events{/privacy}","received_events_url":"https://api.github.com/users/eerhardt/received_events","type":"User","site_admin":false},"body":"Implementing CalendarData.GetCalendars to get the list of available calendars for each culture.  ICU has some differences in calendar preferences vs. Windows for certain cultures.\r\n\r\nGetting JapaneseCalendar era information from ICU.  Only retrieving the eras that are in the JapaneseCalendar timeframe (1868/09/08 - DateTime.MaxValue).  Currently there are 4 eras.  CLDR doesn't have abbreviated Japanese era names.  On Windows, the JapaneseCalendar returns just the first character for the abbreviated era name.  I made the Unix implementation the same by just returning the first character.","created_at":"2015-09-03T22:35:15Z","updated_at":"2015-09-08T19:18:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68b7dee13c06f77c04367a634baddc066a241171","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ellismg/coreclr/pulls/5/commits","review_comments_url":"https://api.github.com/repos/ellismg/coreclr/pulls/5/comments","review_comment_url":"https://api.github.com/repos/ellismg/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ellismg/coreclr/issues/5/comments","statuses_url":"https://api.github.com/repos/ellismg/coreclr/statuses/9db69267cd2607f34bbfcad1df5098e54fb0c274","head":{"label":"eerhardt:GetCalendars","ref":"GetCalendars","sha":"9db69267cd2607f34bbfcad1df5098e54fb0c274","user":{"login":"eerhardt","id":8291187,"avatar_url":"https://avatars.githubusercontent.com/u/8291187?v=3","gravatar_id":"","url":"https://api.github.com/users/eerhardt","html_url":"https://github.com/eerhardt","followers_url":"https://api.github.com/users/eerhardt/followers","following_url":"https://api.github.com/users/eerhardt/following{/other_user}","gists_url":"https://api.github.com/users/eerhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/eerhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eerhardt/subscriptions","organizations_url":"https://api.github.com/users/eerhardt/orgs","repos_url":"https://api.github.com/users/eerhardt/repos","events_url":"https://api.github.com/users/eerhardt/events{/privacy}","received_events_url":"https://api.github.com/users/eerhardt/received_events","type":"User","site_admin":false},"repo":{"id":39392450,"name":"coreclr","full_name":"eerhardt/coreclr","owner":{"login":"eerhardt","id":8291187,"avatar_url":"https://avatars.githubusercontent.com/u/8291187?v=3","gravatar_id":"","url":"https://api.github.com/users/eerhardt","html_url":"https://github.com/eerhardt","followers_url":"https://api.github.com/users/eerhardt/followers","following_url":"https://api.github.com/users/eerhardt/following{/other_user}","gists_url":"https://api.github.com/users/eerhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/eerhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eerhardt/subscriptions","organizations_url":"https://api.github.com/users/eerhardt/orgs","repos_url":"https://api.github.com/users/eerhardt/repos","events_url":"https://api.github.com/users/eerhardt/events{/privacy}","received_events_url":"https://api.github.com/users/eerhardt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eerhardt/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":true,"url":"https://api.github.com/repos/eerhardt/coreclr","forks_url":"https://api.github.com/repos/eerhardt/coreclr/forks","keys_url":"https://api.github.com/repos/eerhardt/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eerhardt/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eerhardt/coreclr/teams","hooks_url":"https://api.github.com/repos/eerhardt/coreclr/hooks","issue_events_url":"https://api.github.com/repos/eerhardt/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/eerhardt/coreclr/events","assignees_url":"https://api.github.com/repos/eerhardt/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/eerhardt/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/eerhardt/coreclr/tags","blobs_url":"https://api.github.com/repos/eerhardt/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eerhardt/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eerhardt/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/eerhardt/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eerhardt/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/eerhardt/coreclr/languages","stargazers_url":"https://api.github.com/repos/eerhardt/coreclr/stargazers","contributors_url":"https://api.github.com/repos/eerhardt/coreclr/contributors","subscribers_url":"https://api.github.com/repos/eerhardt/coreclr/subscribers","subscription_url":"https://api.github.com/repos/eerhardt/coreclr/subscription","commits_url":"https://api.github.com/repos/eerhardt/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/eerhardt/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/eerhardt/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/eerhardt/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/eerhardt/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/eerhardt/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eerhardt/coreclr/merges","archive_url":"https://api.github.com/repos/eerhardt/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eerhardt/coreclr/downloads","issues_url":"https://api.github.com/repos/eerhardt/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/eerhardt/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/eerhardt/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/eerhardt/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eerhardt/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/eerhardt/coreclr/releases{/id}","created_at":"2015-07-20T15:37:07Z","updated_at":"2015-07-20T15:37:45Z","pushed_at":"2015-09-08T18:34:34Z","git_url":"git://github.com/eerhardt/coreclr.git","ssh_url":"git@github.com:eerhardt/coreclr.git","clone_url":"https://github.com/eerhardt/coreclr.git","svn_url":"https://github.com/eerhardt/coreclr","homepage":"http://dotnet.github.io/core/","size":36482,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"ellismg:icu-normalization-casing-idna","ref":"icu-normalization-casing-idna","sha":"2ec1aab5cf238a64abe5909143526c0bcc53148a","user":{"login":"ellismg","id":9602953,"avatar_url":"https://avatars.githubusercontent.com/u/9602953?v=3","gravatar_id":"","url":"https://api.github.com/users/ellismg","html_url":"https://github.com/ellismg","followers_url":"https://api.github.com/users/ellismg/followers","following_url":"https://api.github.com/users/ellismg/following{/other_user}","gists_url":"https://api.github.com/users/ellismg/gists{/gist_id}","starred_url":"https://api.github.com/users/ellismg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ellismg/subscriptions","organizations_url":"https://api.github.com/users/ellismg/orgs","repos_url":"https://api.github.com/users/ellismg/repos","events_url":"https://api.github.com/users/ellismg/events{/privacy}","received_events_url":"https://api.github.com/users/ellismg/received_events","type":"User","site_admin":false},"repo":{"id":30256626,"name":"coreclr","full_name":"ellismg/coreclr","owner":{"login":"ellismg","id":9602953,"avatar_url":"https://avatars.githubusercontent.com/u/9602953?v=3","gravatar_id":"","url":"https://api.github.com/users/ellismg","html_url":"https://github.com/ellismg","followers_url":"https://api.github.com/users/ellismg/followers","following_url":"https://api.github.com/users/ellismg/following{/other_user}","gists_url":"https://api.github.com/users/ellismg/gists{/gist_id}","starred_url":"https://api.github.com/users/ellismg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ellismg/subscriptions","organizations_url":"https://api.github.com/users/ellismg/orgs","repos_url":"https://api.github.com/users/ellismg/repos","events_url":"https://api.github.com/users/ellismg/events{/privacy}","received_events_url":"https://api.github.com/users/ellismg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ellismg/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/ellismg/coreclr","forks_url":"https://api.github.com/repos/ellismg/coreclr/forks","keys_url":"https://api.github.com/repos/ellismg/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ellismg/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ellismg/coreclr/teams","hooks_url":"https://api.github.com/repos/ellismg/coreclr/hooks","issue_events_url":"https://api.github.com/repos/ellismg/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/ellismg/coreclr/events","assignees_url":"https://api.github.com/repos/ellismg/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/ellismg/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/ellismg/coreclr/tags","blobs_url":"https://api.github.com/repos/ellismg/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ellismg/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ellismg/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/ellismg/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ellismg/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/ellismg/coreclr/languages","stargazers_url":"https://api.github.com/repos/ellismg/coreclr/stargazers","contributors_url":"https://api.github.com/repos/ellismg/coreclr/contributors","subscribers_url":"https://api.github.com/repos/ellismg/coreclr/subscribers","subscription_url":"https://api.github.com/repos/ellismg/coreclr/subscription","commits_url":"https://api.github.com/repos/ellismg/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/ellismg/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/ellismg/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/ellismg/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/ellismg/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/ellismg/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ellismg/coreclr/merges","archive_url":"https://api.github.com/repos/ellismg/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ellismg/coreclr/downloads","issues_url":"https://api.github.com/repos/ellismg/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/ellismg/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/ellismg/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/ellismg/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ellismg/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/ellismg/coreclr/releases{/id}","created_at":"2015-02-03T18:00:05Z","updated_at":"2015-06-17T05:45:44Z","pushed_at":"2015-09-08T18:34:34Z","git_url":"git://github.com/ellismg/coreclr.git","ssh_url":"git@github.com:ellismg/coreclr.git","clone_url":"https://github.com/ellismg/coreclr.git","svn_url":"https://github.com/ellismg/coreclr","homepage":"","size":36880,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ellismg/coreclr/pulls/5"},"html":{"href":"https://github.com/ellismg/coreclr/pull/5"},"issue":{"href":"https://api.github.com/repos/ellismg/coreclr/issues/5"},"comments":{"href":"https://api.github.com/repos/ellismg/coreclr/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/ellismg/coreclr/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/ellismg/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ellismg/coreclr/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/ellismg/coreclr/statuses/9db69267cd2607f34bbfcad1df5098e54fb0c274"}}}}