{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/90760828","pull_request_review_id":11280246,"id":90760828,"diff_hunk":"@@ -0,0 +1,25 @@\n+/**\n+ * @license\n+ * Copyright Google Inc. All Rights Reserved.\n+ *\n+ * Use of this source code is governed by an MIT-style license that can be\n+ * found in the LICENSE file at https://angular.io/license\n+ */\n+\n+import {DateFormatter} from '../src/intl';\n+\n+export function main() {\n+  describe('DateFormatter', () => {\n+    it('caches already seen date patterns', () => {\n+      const date = new Date();\n+      const locale = 'en-US';\n+      const pattern = 'MMMM yyyy';\n+      spyOn(Map.prototype, 'get').and.callThrough();\n+      spyOn(Map.prototype, 'set').and.callThrough();\n+      DateFormatter.format(date, locale, pattern);\n+      expect(Map.prototype.get).toHaveBeenCalledWith(pattern);\n+      expect(Map.prototype.set).toHaveBeenCalledWith(pattern, jasmine.any(Array));","path":"modules/@angular/facade/test/intl_spec.ts","position":null,"original_position":21,"commit_id":"cde675a91283ba2b415a499568e1b12bd7fae547","original_commit_id":"167a5c2af783b2d57ce43537697397575511873d","user":{"login":"awerlang","id":589286,"avatar_url":"https://avatars.githubusercontent.com/u/589286?v=3","gravatar_id":"","url":"https://api.github.com/users/awerlang","html_url":"https://github.com/awerlang","followers_url":"https://api.github.com/users/awerlang/followers","following_url":"https://api.github.com/users/awerlang/following{/other_user}","gists_url":"https://api.github.com/users/awerlang/gists{/gist_id}","starred_url":"https://api.github.com/users/awerlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awerlang/subscriptions","organizations_url":"https://api.github.com/users/awerlang/orgs","repos_url":"https://api.github.com/users/awerlang/repos","events_url":"https://api.github.com/users/awerlang/events{/privacy}","received_events_url":"https://api.github.com/users/awerlang/received_events","type":"User","site_admin":false},"body":"Removed the test as requested. Let me know if there's anything blocking.","created_at":"2016-12-03T17:04:28Z","updated_at":"2016-12-03T17:04:28Z","html_url":"https://github.com/angular/angular/pull/12764#discussion_r90760828","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/12764","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/90760828"},"html":{"href":"https://github.com/angular/angular/pull/12764#discussion_r90760828"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/12764"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/12764","id":92778076,"html_url":"https://github.com/angular/angular/pull/12764","diff_url":"https://github.com/angular/angular/pull/12764.diff","patch_url":"https://github.com/angular/angular/pull/12764.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/12764","number":12764,"state":"open","locked":false,"title":"fix(facade): cache original date format string","user":{"login":"awerlang","id":589286,"avatar_url":"https://avatars.githubusercontent.com/u/589286?v=3","gravatar_id":"","url":"https://api.github.com/users/awerlang","html_url":"https://github.com/awerlang","followers_url":"https://api.github.com/users/awerlang/followers","following_url":"https://api.github.com/users/awerlang/following{/other_user}","gists_url":"https://api.github.com/users/awerlang/gists{/gist_id}","starred_url":"https://api.github.com/users/awerlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awerlang/subscriptions","organizations_url":"https://api.github.com/users/awerlang/orgs","repos_url":"https://api.github.com/users/awerlang/repos","events_url":"https://api.github.com/users/awerlang/events{/privacy}","received_events_url":"https://api.github.com/users/awerlang/received_events","type":"User","site_admin":false},"body":"**Please check if the PR fulfills these requirements**\r\n- [X] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit\r\n- [x] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\n\r\n**What kind of change does this PR introduce?** (check one with \"x\")\r\n```\r\n[X] Bugfix\r\n[ ] Feature\r\n[ ] Code style update (formatting, local variables)\r\n[ ] Refactoring (no functional changes, no api changes)\r\n[ ] Build related changes\r\n[ ] CI related changes\r\n[ ] Other... Please describe:\r\n```\r\n\r\n**What is the current behavior?** (You can also link to an open issue here)\r\n\r\nThere's a useless cache being maintained in the Intl facade for dates. Its purpose it's to avoid a possibly expensive RegExp operation. Unfortunately the expensive result was being cached in the wrong entry (null).\r\n\r\n**What is the new behavior?**\r\n\r\nAdd to the correct cache entry.\r\n\r\n**Does this PR introduce a breaking change?** (check one with \"x\")\r\n```\r\n[ ] Yes\r\n[X] No\r\n```\r\n\r\nIf this PR contains a breaking change, please describe the impact and migration path for existing applications: ...\r\n\r\n\r\n**Other information**:\r\n\r\n\r\n","created_at":"2016-11-08T13:32:31Z","updated_at":"2016-12-03T17:04:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47bf644f92fabfa3368191add4a515bec7e59842","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/12764/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/12764/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/12764/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/cde675a91283ba2b415a499568e1b12bd7fae547","head":{"label":"awerlang:fix-dateparts-cache","ref":"fix-dateparts-cache","sha":"cde675a91283ba2b415a499568e1b12bd7fae547","user":{"login":"awerlang","id":589286,"avatar_url":"https://avatars.githubusercontent.com/u/589286?v=3","gravatar_id":"","url":"https://api.github.com/users/awerlang","html_url":"https://github.com/awerlang","followers_url":"https://api.github.com/users/awerlang/followers","following_url":"https://api.github.com/users/awerlang/following{/other_user}","gists_url":"https://api.github.com/users/awerlang/gists{/gist_id}","starred_url":"https://api.github.com/users/awerlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awerlang/subscriptions","organizations_url":"https://api.github.com/users/awerlang/orgs","repos_url":"https://api.github.com/users/awerlang/repos","events_url":"https://api.github.com/users/awerlang/events{/privacy}","received_events_url":"https://api.github.com/users/awerlang/received_events","type":"User","site_admin":false},"repo":{"id":62975656,"name":"angular","full_name":"awerlang/angular","owner":{"login":"awerlang","id":589286,"avatar_url":"https://avatars.githubusercontent.com/u/589286?v=3","gravatar_id":"","url":"https://api.github.com/users/awerlang","html_url":"https://github.com/awerlang","followers_url":"https://api.github.com/users/awerlang/followers","following_url":"https://api.github.com/users/awerlang/following{/other_user}","gists_url":"https://api.github.com/users/awerlang/gists{/gist_id}","starred_url":"https://api.github.com/users/awerlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awerlang/subscriptions","organizations_url":"https://api.github.com/users/awerlang/orgs","repos_url":"https://api.github.com/users/awerlang/repos","events_url":"https://api.github.com/users/awerlang/events{/privacy}","received_events_url":"https://api.github.com/users/awerlang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/awerlang/angular","description":null,"fork":true,"url":"https://api.github.com/repos/awerlang/angular","forks_url":"https://api.github.com/repos/awerlang/angular/forks","keys_url":"https://api.github.com/repos/awerlang/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awerlang/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awerlang/angular/teams","hooks_url":"https://api.github.com/repos/awerlang/angular/hooks","issue_events_url":"https://api.github.com/repos/awerlang/angular/issues/events{/number}","events_url":"https://api.github.com/repos/awerlang/angular/events","assignees_url":"https://api.github.com/repos/awerlang/angular/assignees{/user}","branches_url":"https://api.github.com/repos/awerlang/angular/branches{/branch}","tags_url":"https://api.github.com/repos/awerlang/angular/tags","blobs_url":"https://api.github.com/repos/awerlang/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awerlang/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awerlang/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/awerlang/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awerlang/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/awerlang/angular/languages","stargazers_url":"https://api.github.com/repos/awerlang/angular/stargazers","contributors_url":"https://api.github.com/repos/awerlang/angular/contributors","subscribers_url":"https://api.github.com/repos/awerlang/angular/subscribers","subscription_url":"https://api.github.com/repos/awerlang/angular/subscription","commits_url":"https://api.github.com/repos/awerlang/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/awerlang/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/awerlang/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/awerlang/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/awerlang/angular/contents/{+path}","compare_url":"https://api.github.com/repos/awerlang/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awerlang/angular/merges","archive_url":"https://api.github.com/repos/awerlang/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awerlang/angular/downloads","issues_url":"https://api.github.com/repos/awerlang/angular/issues{/number}","pulls_url":"https://api.github.com/repos/awerlang/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/awerlang/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/awerlang/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awerlang/angular/labels{/name}","releases_url":"https://api.github.com/repos/awerlang/angular/releases{/id}","deployments_url":"https://api.github.com/repos/awerlang/angular/deployments","created_at":"2016-07-10T01:02:53Z","updated_at":"2016-07-10T01:03:14Z","pushed_at":"2016-12-03T17:00:52Z","git_url":"git://github.com/awerlang/angular.git","ssh_url":"git@github.com:awerlang/angular.git","clone_url":"https://github.com/awerlang/angular.git","svn_url":"https://github.com/awerlang/angular","homepage":"https://angular.io","size":410397,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"angular:master","ref":"master","sha":"6cf7a1bf8426b19b0f35c04c279619cde101cd03","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":24195339,"name":"angular","full_name":"angular/angular","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular","description":null,"fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular/deployments","created_at":"2014-09-18T16:12:01Z","updated_at":"2016-12-03T16:49:45Z","pushed_at":"2016-12-03T17:00:55Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":652816,"stargazers_count":18532,"watchers_count":18532,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4773,"mirror_url":null,"open_issues_count":970,"forks":4773,"open_issues":970,"watchers":18532,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/12764"},"html":{"href":"https://github.com/angular/angular/pull/12764"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/12764"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/12764/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/12764/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/12764/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/cde675a91283ba2b415a499568e1b12bd7fae547"}}}}
{"actor":{"display_login":"awerlang"}}