{"action":"created","comment":{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/comments/142754879","pull_request_review_id":67162885,"id":142754879,"diff_hunk":"@@ -207,11 +205,78 @@ function getDatePartHashValue(date: Date) {\n  * @param {DayOfWeek} firstDayOfWeek - The first day of the week (0-6, Sunday = 0)\n  * @return {Number} The week's number in the year.\n  */\n-export function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek) {\n-  let num = getDayOfYear(date) - 1;\n-  let num2 = date.getDay() - (num % 7);\n-  let num3 = ((num2 - firstDayOfWeek) + 14) % 7;\n-  return Math.floor(((num + num3) / 7) + 1);\n+export function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear) {","path":"packages/office-ui-fabric-react/src/utilities/dateMath/DateMath.ts","position":66,"original_position":66,"commit_id":"7f5718b742494aaf20be38e806ab857fbddff788","original_commit_id":"7f5718b742494aaf20be38e806ab857fbddff788","user":{"login":"yananym","id":3697148,"avatar_url":"https://avatars0.githubusercontent.com/u/3697148?v=4","gravatar_id":"","url":"https://api.github.com/users/yananym","html_url":"https://github.com/yananym","followers_url":"https://api.github.com/users/yananym/followers","following_url":"https://api.github.com/users/yananym/following{/other_user}","gists_url":"https://api.github.com/users/yananym/gists{/gist_id}","starred_url":"https://api.github.com/users/yananym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yananym/subscriptions","organizations_url":"https://api.github.com/users/yananym/orgs","repos_url":"https://api.github.com/users/yananym/repos","events_url":"https://api.github.com/users/yananym/events{/privacy}","received_events_url":"https://api.github.com/users/yananym/received_events","type":"User","site_admin":false},"body":"That's exactly what i'm doing. Her function is getDefaultWeekNumber() - I renames variables to make a little more sense of the math.","created_at":"2017-10-04T18:30:26Z","updated_at":"2017-10-04T18:30:26Z","html_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/3001#discussion_r142754879","pull_request_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/comments/142754879"},"html":{"href":"https://github.com/OfficeDev/office-ui-fabric-react/pull/3001#discussion_r142754879"},"pull_request":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001"}},"in_reply_to_id":142754148},"pull_request":{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001","id":144278845,"html_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/3001","diff_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/3001.diff","patch_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/3001.patch","issue_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/3001","number":3001,"state":"open","locked":false,"title":"Date picker week numbers settings","user":{"login":"yananym","id":3697148,"avatar_url":"https://avatars0.githubusercontent.com/u/3697148?v=4","gravatar_id":"","url":"https://api.github.com/users/yananym","html_url":"https://github.com/yananym","followers_url":"https://api.github.com/users/yananym/followers","following_url":"https://api.github.com/users/yananym/following{/other_user}","gists_url":"https://api.github.com/users/yananym/gists{/gist_id}","starred_url":"https://api.github.com/users/yananym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yananym/subscriptions","organizations_url":"https://api.github.com/users/yananym/orgs","repos_url":"https://api.github.com/users/yananym/repos","events_url":"https://api.github.com/users/yananym/events{/privacy}","received_events_url":"https://api.github.com/users/yananym/received_events","type":"User","site_admin":false},"body":"#### Pull request checklist\r\n\r\n- [-] Addresses an existing issue: \r\n- [+] Include a change request file using `$ npm run change`\r\n\r\n#### Description of changes\r\n\r\nAdding new feature to calendar inside of DatePicket to calculate week numbers based on settings passed to a date picker (start counting weeks on Jan 1st/first full week or first 4-day week.\r\n@johannao76 @kellygorr \r\n\r\n#### Focus areas to test\r\n\r\nDatePicker with week numbers shown: e.g. four-day-week setting is enabled on screenshot:\r\n![screen shot 2017-10-02 at 1 41 17 pm](https://user-images.githubusercontent.com/3697148/31098460-6ff5c02c-a777-11e7-9937-dc3fac482c46.png)\r\n","created_at":"2017-10-02T20:42:29Z","updated_at":"2017-10-04T18:30:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9ba659bf2cbb10ac39f7d6a022d4838b83936f1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lorejoh12","id":8549582,"avatar_url":"https://avatars3.githubusercontent.com/u/8549582?v=4","gravatar_id":"","url":"https://api.github.com/users/lorejoh12","html_url":"https://github.com/lorejoh12","followers_url":"https://api.github.com/users/lorejoh12/followers","following_url":"https://api.github.com/users/lorejoh12/following{/other_user}","gists_url":"https://api.github.com/users/lorejoh12/gists{/gist_id}","starred_url":"https://api.github.com/users/lorejoh12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorejoh12/subscriptions","organizations_url":"https://api.github.com/users/lorejoh12/orgs","repos_url":"https://api.github.com/users/lorejoh12/repos","events_url":"https://api.github.com/users/lorejoh12/events{/privacy}","received_events_url":"https://api.github.com/users/lorejoh12/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001/commits","review_comments_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001/comments","review_comment_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/3001/comments","statuses_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/statuses/7f5718b742494aaf20be38e806ab857fbddff788","head":{"label":"yananym:datePickerWeekNumbersSettings","ref":"datePickerWeekNumbersSettings","sha":"7f5718b742494aaf20be38e806ab857fbddff788","user":{"login":"yananym","id":3697148,"avatar_url":"https://avatars0.githubusercontent.com/u/3697148?v=4","gravatar_id":"","url":"https://api.github.com/users/yananym","html_url":"https://github.com/yananym","followers_url":"https://api.github.com/users/yananym/followers","following_url":"https://api.github.com/users/yananym/following{/other_user}","gists_url":"https://api.github.com/users/yananym/gists{/gist_id}","starred_url":"https://api.github.com/users/yananym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yananym/subscriptions","organizations_url":"https://api.github.com/users/yananym/orgs","repos_url":"https://api.github.com/users/yananym/repos","events_url":"https://api.github.com/users/yananym/events{/privacy}","received_events_url":"https://api.github.com/users/yananym/received_events","type":"User","site_admin":false},"repo":{"id":105329641,"name":"office-ui-fabric-react","full_name":"yananym/office-ui-fabric-react","owner":{"login":"yananym","id":3697148,"avatar_url":"https://avatars0.githubusercontent.com/u/3697148?v=4","gravatar_id":"","url":"https://api.github.com/users/yananym","html_url":"https://github.com/yananym","followers_url":"https://api.github.com/users/yananym/followers","following_url":"https://api.github.com/users/yananym/following{/other_user}","gists_url":"https://api.github.com/users/yananym/gists{/gist_id}","starred_url":"https://api.github.com/users/yananym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yananym/subscriptions","organizations_url":"https://api.github.com/users/yananym/orgs","repos_url":"https://api.github.com/users/yananym/repos","events_url":"https://api.github.com/users/yananym/events{/privacy}","received_events_url":"https://api.github.com/users/yananym/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yananym/office-ui-fabric-react","description":"React components for building experiences for Office and Office 365.","fork":true,"url":"https://api.github.com/repos/yananym/office-ui-fabric-react","forks_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/forks","keys_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/teams","hooks_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/hooks","issue_events_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/issues/events{/number}","events_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/events","assignees_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/assignees{/user}","branches_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/branches{/branch}","tags_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/tags","blobs_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/statuses/{sha}","languages_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/languages","stargazers_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/stargazers","contributors_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/contributors","subscribers_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/subscribers","subscription_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/subscription","commits_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/contents/{+path}","compare_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/merges","archive_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/downloads","issues_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/issues{/number}","pulls_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/pulls{/number}","milestones_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/milestones{/number}","notifications_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/labels{/name}","releases_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/releases{/id}","deployments_url":"https://api.github.com/repos/yananym/office-ui-fabric-react/deployments","created_at":"2017-09-30T01:07:32Z","updated_at":"2017-09-30T01:07:37Z","pushed_at":"2017-10-04T00:03:27Z","git_url":"git://github.com/yananym/office-ui-fabric-react.git","ssh_url":"git@github.com:yananym/office-ui-fabric-react.git","clone_url":"https://github.com/yananym/office-ui-fabric-react.git","svn_url":"https://github.com/yananym/office-ui-fabric-react","homepage":"https://developer.microsoft.com/en-us/fabric#/components","size":18270,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"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":"OfficeDev:master","ref":"master","sha":"6e4d8f5e07328bad7c50e0671d85c1fb8a9db79a","user":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars2.githubusercontent.com/u/6789362?v=4","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"repo":{"id":60537144,"name":"office-ui-fabric-react","full_name":"OfficeDev/office-ui-fabric-react","owner":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars2.githubusercontent.com/u/6789362?v=4","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OfficeDev/office-ui-fabric-react","description":"React components for building experiences for Office and Office 365.","fork":false,"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react","forks_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/forks","keys_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/teams","hooks_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/hooks","issue_events_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/events{/number}","events_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/events","assignees_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/assignees{/user}","branches_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/branches{/branch}","tags_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/tags","blobs_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/statuses/{sha}","languages_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/languages","stargazers_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/stargazers","contributors_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/contributors","subscribers_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/subscribers","subscription_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/subscription","commits_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/contents/{+path}","compare_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/merges","archive_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/downloads","issues_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues{/number}","pulls_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls{/number}","milestones_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/milestones{/number}","notifications_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/labels{/name}","releases_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/releases{/id}","deployments_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/deployments","created_at":"2016-06-06T15:03:44Z","updated_at":"2017-10-04T06:17:13Z","pushed_at":"2017-10-04T18:26:59Z","git_url":"git://github.com/OfficeDev/office-ui-fabric-react.git","ssh_url":"git@github.com:OfficeDev/office-ui-fabric-react.git","clone_url":"https://github.com/OfficeDev/office-ui-fabric-react.git","svn_url":"https://github.com/OfficeDev/office-ui-fabric-react","homepage":"https://developer.microsoft.com/en-us/fabric#/components","size":18390,"stargazers_count":1610,"watchers_count":1610,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":341,"mirror_url":null,"open_issues_count":410,"forks":341,"open_issues":410,"watchers":1610,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001"},"html":{"href":"https://github.com/OfficeDev/office-ui-fabric-react/pull/3001"},"issue":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/3001"},"comments":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/3001/comments"},"review_comments":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001/comments"},"review_comment":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/3001/commits"},"statuses":{"href":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/statuses/7f5718b742494aaf20be38e806ab857fbddff788"}},"author_association":"NONE"}}
{"actor":{"display_login":"yananym"}}