{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/globalize/pulls/comments/26985900","id":26985900,"diff_hunk":"@@ -33,10 +55,65 @@ return function( pattern, cldr ) {\n \n \tswitch ( true ) {\n \t\tcase \"skeleton\" in pattern:\n-\t\t\tresult = cldr.main([\n-\t\t\t\t\"dates/calendars/gregorian/dateTimeFormats/availableFormats\",\n-\t\t\t\tpattern.skeleton\n-\t\t\t]);\n+\t\t\tflagDate = false, flagTime = false;\n+\t\t\tskeleton = pattern.skeleton;\n+\t\t\tif ( /[hHms]/.test( skeleton ) ) {\n+\t\t\t\tflagTime = true;\n+\t\t\t}\n+\t\t\tif ( /[GyQMd]/.test( skeleton ) ) {\n+\t\t\t\tflagDate = true;\n+\t\t\t}\n+\t\t\tif ( /Ed/g.test( skeleton ) ) {\n+\t\t\t\tflagDate = true;\n+\t\t\t} else if ( /Eh/g.test( skeleton ) || /EH/g.test( skeleton ) ||\n+\t\t\t\t\t/E/g.test( skeleton ) ) {\n+\t\t\t\tflagTime = true;\n+\t\t\t}\n+\t\t\tif ( ( flagDate !== flagTime ) ) {\n+\t\t\t\tresult = cldr.main([\n+\t\t\t\t\t\"dates/calendars/gregorian/dateTimeFormats/availableFormats\",\n+\t\t\t\t\tskeleton\n+\t\t\t\t]);\n+\t\t\t} else if ( flagDate && flagTime ) {\n+\t\t\t\tdateSkeleton = \"\", timeSkeleton = \"\";\n+\t\t\t\tfor ( i = 0 ; i < skeleton.length ; i++ ) {\n+\t\t\t\t\tif ( /[hHms]/.test( skeleton[ i ] ) ) {\n+\t\t\t\t\t\ttimeSkeleton += skeleton[ i ];\n+\t\t\t\t\t} else if ( /[GyQMd]/.test( skeleton[ i ] ) ) {\n+\t\t\t\t\t\tdateSkeleton += skeleton[ i ];\n+\t\t\t\t\t} else if ( skeleton[ i ] === \"E\" ) {\n+\t\t\t\t\t\tif ( /Ed/g.test( skeleton.slice( i ) ) ) {\n+\t\t\t\t\t\t\tdateSkeleton += \"Ed\";\n+\t\t\t\t\t\t\ti++;\n+\t\t\t\t\t\t} else if ( /Eh/g.test( skeleton.slice( i ) ) ) {\n+\t\t\t\t\t\t\ttimeSkeleton += \"Eh\";\n+\t\t\t\t\t\t\ti++;\n+\t\t\t\t\t\t} else if ( /EH/g.test( skeleton.slice( i ) ) ) {\n+\t\t\t\t\t\t\ttimeSkeleton += \"EH\";\n+\t\t\t\t\t\t\ti++;\n+\t\t\t\t\t\t} else {\n+\t\t\t\t\t\t\ttimeSkeleton += \"E\";\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\tif ( /MMMM/g.test( dateSkeleton ) && /[E]/.test( dateSkeleton ) ) {\n+\t\t\t\t\tresult = getDateTime( \"full\", dateSkeleton, timeSkeleton, cldr );\n+\t\t\t\t} else if ( /MMMM/g.test( dateSkeleton ) ) {\n+\t\t\t\t\tresult = getDateTime( \"long\", dateSkeleton, timeSkeleton, cldr );\n+\t\t\t\t} else if ( /MMM/g.test( dateSkeleton ) ) {\n+\t\t\t\t\tresult = getDateTime( \"medium\", dateSkeleton, timeSkeleton, cldr );\n+\t\t\t\t\tif ( result.indexOf( \"G\" ) > -1 ) {\n+\t\t\t\t\t\tresult = result.replace( \"G\", \"\" );\n+\t\t\t\t\t\tresult += \" G\";\n+\t\t\t\t\t}","path":"src/date/expand-pattern.js","position":90,"original_position":90,"commit_id":"2919ab68e6e99d19184183c0b312febb987fea14","original_commit_id":"2919ab68e6e99d19184183c0b312febb987fea14","user":{"login":"rxaviers","id":967155,"avatar_url":"https://avatars.githubusercontent.com/u/967155?v=3","gravatar_id":"","url":"https://api.github.com/users/rxaviers","html_url":"https://github.com/rxaviers","followers_url":"https://api.github.com/users/rxaviers/followers","following_url":"https://api.github.com/users/rxaviers/following{/other_user}","gists_url":"https://api.github.com/users/rxaviers/gists{/gist_id}","starred_url":"https://api.github.com/users/rxaviers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxaviers/subscriptions","organizations_url":"https://api.github.com/users/rxaviers/orgs","repos_url":"https://api.github.com/users/rxaviers/repos","events_url":"https://api.github.com/users/rxaviers/events{/privacy}","received_events_url":"https://api.github.com/users/rxaviers/received_events","type":"User","site_admin":false},"body":"I don't get it why you're testing G here individually?","created_at":"2015-03-23T22:10:48Z","updated_at":"2015-03-23T22:10:48Z","html_url":"https://github.com/jquery/globalize/pull/426#discussion_r26985900","pull_request_url":"https://api.github.com/repos/jquery/globalize/pulls/426","_links":{"self":{"href":"https://api.github.com/repos/jquery/globalize/pulls/comments/26985900"},"html":{"href":"https://github.com/jquery/globalize/pull/426#discussion_r26985900"},"pull_request":{"href":"https://api.github.com/repos/jquery/globalize/pulls/426"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/globalize/pulls/426","id":31474457,"html_url":"https://github.com/jquery/globalize/pull/426","diff_url":"https://github.com/jquery/globalize/pull/426.diff","patch_url":"https://github.com/jquery/globalize/pull/426.patch","issue_url":"https://api.github.com/repos/jquery/globalize/issues/426","number":426,"state":"open","locked":false,"title":"Fixed issue 272 Handle DateTime in same skeleton.","user":{"login":"ManrajGrover","id":5673050,"avatar_url":"https://avatars.githubusercontent.com/u/5673050?v=3","gravatar_id":"","url":"https://api.github.com/users/ManrajGrover","html_url":"https://github.com/ManrajGrover","followers_url":"https://api.github.com/users/ManrajGrover/followers","following_url":"https://api.github.com/users/ManrajGrover/following{/other_user}","gists_url":"https://api.github.com/users/ManrajGrover/gists{/gist_id}","starred_url":"https://api.github.com/users/ManrajGrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManrajGrover/subscriptions","organizations_url":"https://api.github.com/users/ManrajGrover/orgs","repos_url":"https://api.github.com/users/ManrajGrover/repos","events_url":"https://api.github.com/users/ManrajGrover/events{/privacy}","received_events_url":"https://api.github.com/users/ManrajGrover/received_events","type":"User","site_admin":false},"body":"@rxaviers sir,\r\n\r\nPlease review the code for issue #272 . I have tested it by making changes in `date.js` but not in `expand-pattern.js` . Please let me know the changes.","created_at":"2015-03-18T21:31:44Z","updated_at":"2015-03-23T22:10:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bf3d1472c848e6be0d1ff5b6510276061adf90d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/globalize/pulls/426/commits","review_comments_url":"https://api.github.com/repos/jquery/globalize/pulls/426/comments","review_comment_url":"https://api.github.com/repos/jquery/globalize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/globalize/issues/426/comments","statuses_url":"https://api.github.com/repos/jquery/globalize/statuses/2919ab68e6e99d19184183c0b312febb987fea14","head":{"label":"ManrajGrover:fix-272-handleDateTime","ref":"fix-272-handleDateTime","sha":"2919ab68e6e99d19184183c0b312febb987fea14","user":{"login":"ManrajGrover","id":5673050,"avatar_url":"https://avatars.githubusercontent.com/u/5673050?v=3","gravatar_id":"","url":"https://api.github.com/users/ManrajGrover","html_url":"https://github.com/ManrajGrover","followers_url":"https://api.github.com/users/ManrajGrover/followers","following_url":"https://api.github.com/users/ManrajGrover/following{/other_user}","gists_url":"https://api.github.com/users/ManrajGrover/gists{/gist_id}","starred_url":"https://api.github.com/users/ManrajGrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManrajGrover/subscriptions","organizations_url":"https://api.github.com/users/ManrajGrover/orgs","repos_url":"https://api.github.com/users/ManrajGrover/repos","events_url":"https://api.github.com/users/ManrajGrover/events{/privacy}","received_events_url":"https://api.github.com/users/ManrajGrover/received_events","type":"User","site_admin":false},"repo":{"id":31730497,"name":"globalize","full_name":"ManrajGrover/globalize","owner":{"login":"ManrajGrover","id":5673050,"avatar_url":"https://avatars.githubusercontent.com/u/5673050?v=3","gravatar_id":"","url":"https://api.github.com/users/ManrajGrover","html_url":"https://github.com/ManrajGrover","followers_url":"https://api.github.com/users/ManrajGrover/followers","following_url":"https://api.github.com/users/ManrajGrover/following{/other_user}","gists_url":"https://api.github.com/users/ManrajGrover/gists{/gist_id}","starred_url":"https://api.github.com/users/ManrajGrover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManrajGrover/subscriptions","organizations_url":"https://api.github.com/users/ManrajGrover/orgs","repos_url":"https://api.github.com/users/ManrajGrover/repos","events_url":"https://api.github.com/users/ManrajGrover/events{/privacy}","received_events_url":"https://api.github.com/users/ManrajGrover/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ManrajGrover/globalize","description":"A JavaScript library for internationalization and localization that leverage the official Unicode CLDR JSON data","fork":true,"url":"https://api.github.com/repos/ManrajGrover/globalize","forks_url":"https://api.github.com/repos/ManrajGrover/globalize/forks","keys_url":"https://api.github.com/repos/ManrajGrover/globalize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManrajGrover/globalize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManrajGrover/globalize/teams","hooks_url":"https://api.github.com/repos/ManrajGrover/globalize/hooks","issue_events_url":"https://api.github.com/repos/ManrajGrover/globalize/issues/events{/number}","events_url":"https://api.github.com/repos/ManrajGrover/globalize/events","assignees_url":"https://api.github.com/repos/ManrajGrover/globalize/assignees{/user}","branches_url":"https://api.github.com/repos/ManrajGrover/globalize/branches{/branch}","tags_url":"https://api.github.com/repos/ManrajGrover/globalize/tags","blobs_url":"https://api.github.com/repos/ManrajGrover/globalize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManrajGrover/globalize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManrajGrover/globalize/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManrajGrover/globalize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManrajGrover/globalize/statuses/{sha}","languages_url":"https://api.github.com/repos/ManrajGrover/globalize/languages","stargazers_url":"https://api.github.com/repos/ManrajGrover/globalize/stargazers","contributors_url":"https://api.github.com/repos/ManrajGrover/globalize/contributors","subscribers_url":"https://api.github.com/repos/ManrajGrover/globalize/subscribers","subscription_url":"https://api.github.com/repos/ManrajGrover/globalize/subscription","commits_url":"https://api.github.com/repos/ManrajGrover/globalize/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManrajGrover/globalize/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManrajGrover/globalize/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManrajGrover/globalize/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManrajGrover/globalize/contents/{+path}","compare_url":"https://api.github.com/repos/ManrajGrover/globalize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManrajGrover/globalize/merges","archive_url":"https://api.github.com/repos/ManrajGrover/globalize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManrajGrover/globalize/downloads","issues_url":"https://api.github.com/repos/ManrajGrover/globalize/issues{/number}","pulls_url":"https://api.github.com/repos/ManrajGrover/globalize/pulls{/number}","milestones_url":"https://api.github.com/repos/ManrajGrover/globalize/milestones{/number}","notifications_url":"https://api.github.com/repos/ManrajGrover/globalize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManrajGrover/globalize/labels{/name}","releases_url":"https://api.github.com/repos/ManrajGrover/globalize/releases{/id}","created_at":"2015-03-05T18:58:13Z","updated_at":"2015-03-05T18:58:14Z","pushed_at":"2015-03-22T10:37:31Z","git_url":"git://github.com/ManrajGrover/globalize.git","ssh_url":"git@github.com:ManrajGrover/globalize.git","clone_url":"https://github.com/ManrajGrover/globalize.git","svn_url":"https://github.com/ManrajGrover/globalize","homepage":"","size":5148,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"7c799459671da82d9f354197f7003ed72a1e78b0","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":946945,"name":"globalize","full_name":"jquery/globalize","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/globalize","description":"A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data","fork":false,"url":"https://api.github.com/repos/jquery/globalize","forks_url":"https://api.github.com/repos/jquery/globalize/forks","keys_url":"https://api.github.com/repos/jquery/globalize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/globalize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/globalize/teams","hooks_url":"https://api.github.com/repos/jquery/globalize/hooks","issue_events_url":"https://api.github.com/repos/jquery/globalize/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/globalize/events","assignees_url":"https://api.github.com/repos/jquery/globalize/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/globalize/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/globalize/tags","blobs_url":"https://api.github.com/repos/jquery/globalize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/globalize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/globalize/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/globalize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/globalize/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/globalize/languages","stargazers_url":"https://api.github.com/repos/jquery/globalize/stargazers","contributors_url":"https://api.github.com/repos/jquery/globalize/contributors","subscribers_url":"https://api.github.com/repos/jquery/globalize/subscribers","subscription_url":"https://api.github.com/repos/jquery/globalize/subscription","commits_url":"https://api.github.com/repos/jquery/globalize/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/globalize/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/globalize/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/globalize/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/globalize/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/globalize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/globalize/merges","archive_url":"https://api.github.com/repos/jquery/globalize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/globalize/downloads","issues_url":"https://api.github.com/repos/jquery/globalize/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/globalize/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/globalize/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/globalize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/globalize/labels{/name}","releases_url":"https://api.github.com/repos/jquery/globalize/releases{/id}","created_at":"2010-09-28T23:01:58Z","updated_at":"2015-03-23T10:15:10Z","pushed_at":"2015-03-22T10:37:31Z","git_url":"git://github.com/jquery/globalize.git","ssh_url":"git@github.com:jquery/globalize.git","clone_url":"https://github.com/jquery/globalize.git","svn_url":"https://github.com/jquery/globalize","homepage":"","size":9427,"stargazers_count":1570,"watchers_count":1570,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":356,"mirror_url":null,"open_issues_count":64,"forks":356,"open_issues":64,"watchers":1570,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/globalize/pulls/426"},"html":{"href":"https://github.com/jquery/globalize/pull/426"},"issue":{"href":"https://api.github.com/repos/jquery/globalize/issues/426"},"comments":{"href":"https://api.github.com/repos/jquery/globalize/issues/426/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/globalize/pulls/426/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/globalize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/globalize/pulls/426/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/globalize/statuses/2919ab68e6e99d19184183c0b312febb987fea14"}}}}