{"action":"created","comment":{"url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/comments/24100242","id":24100242,"diff_hunk":"@@ -96,7 +96,13 @@ define(['exports', 'moment', 'bootstrap-notify'], function(exports, moment) {\n         }\n \n         // TODO: add the week number when the custom configuration is in place\n-        var weekNumber = 'W?';\n+        // var weekNumber = 'W' + getWeekInTerm(startDate);\n+        var weekNumber = getWeekInTerm(startDate);\n+        if (weekNumber === 0) {\n+            weekNumber = 'OT';","path":"shared/gh/api/gh.api.util.js","position":8,"original_position":8,"commit_id":"9f88c1265be11e2562d2cf9b2ba93191228bedcb","original_commit_id":"9f88c1265be11e2562d2cf9b2ba93191228bedcb","user":{"login":"bp323","id":218391,"avatar_url":"https://avatars.githubusercontent.com/u/218391?v=3","gravatar_id":"","url":"https://api.github.com/users/bp323","html_url":"https://github.com/bp323","followers_url":"https://api.github.com/users/bp323/followers","following_url":"https://api.github.com/users/bp323/following{/other_user}","gists_url":"https://api.github.com/users/bp323/gists{/gist_id}","starred_url":"https://api.github.com/users/bp323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp323/subscriptions","organizations_url":"https://api.github.com/users/bp323/orgs","repos_url":"https://api.github.com/users/bp323/repos","events_url":"https://api.github.com/users/bp323/events{/privacy}","received_events_url":"https://api.github.com/users/bp323/received_events","type":"User","site_admin":false},"body":"I've been talking to Oszkar and this is the expected text for events that fall out of term (hence OT)","created_at":"2015-02-04T17:17:01Z","updated_at":"2015-02-04T17:17:01Z","html_url":"https://github.com/CUL-DigitalServices/grasshopper-ui/pull/147#discussion_r24100242","pull_request_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147","_links":{"self":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/comments/24100242"},"html":{"href":"https://github.com/CUL-DigitalServices/grasshopper-ui/pull/147#discussion_r24100242"},"pull_request":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147","id":28656463,"html_url":"https://github.com/CUL-DigitalServices/grasshopper-ui/pull/147","diff_url":"https://github.com/CUL-DigitalServices/grasshopper-ui/pull/147.diff","patch_url":"https://github.com/CUL-DigitalServices/grasshopper-ui/pull/147.patch","issue_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues/147","number":147,"state":"open","locked":false,"title":"Calculate the week number in batch edit","user":{"login":"bp323","id":218391,"avatar_url":"https://avatars.githubusercontent.com/u/218391?v=3","gravatar_id":"","url":"https://api.github.com/users/bp323","html_url":"https://github.com/bp323","followers_url":"https://api.github.com/users/bp323/followers","following_url":"https://api.github.com/users/bp323/following{/other_user}","gists_url":"https://api.github.com/users/bp323/gists{/gist_id}","starred_url":"https://api.github.com/users/bp323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp323/subscriptions","organizations_url":"https://api.github.com/users/bp323/orgs","repos_url":"https://api.github.com/users/bp323/repos","events_url":"https://api.github.com/users/bp323/events{/privacy}","received_events_url":"https://api.github.com/users/bp323/received_events","type":"User","site_admin":false},"body":"As we now have the necessary configuration in place to do this, we should calculate the week in the term of the date that was chosen for an event.\r\n\r\nI think, ideally, we should create a utility function that takes in 2 parameters `date` and `term`. Date is a string that parses into a valid date and term is the term object coming from the configuration. The utility function would calculate which week the date is in and return a Number (not a callback).\r\n\r\n![screen shot 2015-02-04 at 11 49 45](https://cloud.githubusercontent.com/assets/218391/6039920/010e2d72-ac64-11e4-8926-77da701e22ac.png)\r\n","created_at":"2015-02-04T17:16:29Z","updated_at":"2015-02-04T17:17:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22cdc399e6a0f9b30e50714d73a9479cb2e27648","assignee":{"login":"bp323","id":218391,"avatar_url":"https://avatars.githubusercontent.com/u/218391?v=3","gravatar_id":"","url":"https://api.github.com/users/bp323","html_url":"https://github.com/bp323","followers_url":"https://api.github.com/users/bp323/followers","following_url":"https://api.github.com/users/bp323/following{/other_user}","gists_url":"https://api.github.com/users/bp323/gists{/gist_id}","starred_url":"https://api.github.com/users/bp323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp323/subscriptions","organizations_url":"https://api.github.com/users/bp323/orgs","repos_url":"https://api.github.com/users/bp323/repos","events_url":"https://api.github.com/users/bp323/events{/privacy}","received_events_url":"https://api.github.com/users/bp323/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147/commits","review_comments_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147/comments","review_comment_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues/147/comments","statuses_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/statuses/9f88c1265be11e2562d2cf9b2ba93191228bedcb","head":{"label":"bp323:weekNumber","ref":"weekNumber","sha":"9f88c1265be11e2562d2cf9b2ba93191228bedcb","user":{"login":"bp323","id":218391,"avatar_url":"https://avatars.githubusercontent.com/u/218391?v=3","gravatar_id":"","url":"https://api.github.com/users/bp323","html_url":"https://github.com/bp323","followers_url":"https://api.github.com/users/bp323/followers","following_url":"https://api.github.com/users/bp323/following{/other_user}","gists_url":"https://api.github.com/users/bp323/gists{/gist_id}","starred_url":"https://api.github.com/users/bp323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp323/subscriptions","organizations_url":"https://api.github.com/users/bp323/orgs","repos_url":"https://api.github.com/users/bp323/repos","events_url":"https://api.github.com/users/bp323/events{/privacy}","received_events_url":"https://api.github.com/users/bp323/received_events","type":"User","site_admin":false},"repo":{"id":26434378,"name":"grasshopper-ui","full_name":"bp323/grasshopper-ui","owner":{"login":"bp323","id":218391,"avatar_url":"https://avatars.githubusercontent.com/u/218391?v=3","gravatar_id":"","url":"https://api.github.com/users/bp323","html_url":"https://github.com/bp323","followers_url":"https://api.github.com/users/bp323/followers","following_url":"https://api.github.com/users/bp323/following{/other_user}","gists_url":"https://api.github.com/users/bp323/gists{/gist_id}","starred_url":"https://api.github.com/users/bp323/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp323/subscriptions","organizations_url":"https://api.github.com/users/bp323/orgs","repos_url":"https://api.github.com/users/bp323/repos","events_url":"https://api.github.com/users/bp323/events{/privacy}","received_events_url":"https://api.github.com/users/bp323/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bp323/grasshopper-ui","description":"Grasshopper UI","fork":true,"url":"https://api.github.com/repos/bp323/grasshopper-ui","forks_url":"https://api.github.com/repos/bp323/grasshopper-ui/forks","keys_url":"https://api.github.com/repos/bp323/grasshopper-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bp323/grasshopper-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bp323/grasshopper-ui/teams","hooks_url":"https://api.github.com/repos/bp323/grasshopper-ui/hooks","issue_events_url":"https://api.github.com/repos/bp323/grasshopper-ui/issues/events{/number}","events_url":"https://api.github.com/repos/bp323/grasshopper-ui/events","assignees_url":"https://api.github.com/repos/bp323/grasshopper-ui/assignees{/user}","branches_url":"https://api.github.com/repos/bp323/grasshopper-ui/branches{/branch}","tags_url":"https://api.github.com/repos/bp323/grasshopper-ui/tags","blobs_url":"https://api.github.com/repos/bp323/grasshopper-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bp323/grasshopper-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bp323/grasshopper-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/bp323/grasshopper-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bp323/grasshopper-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/bp323/grasshopper-ui/languages","stargazers_url":"https://api.github.com/repos/bp323/grasshopper-ui/stargazers","contributors_url":"https://api.github.com/repos/bp323/grasshopper-ui/contributors","subscribers_url":"https://api.github.com/repos/bp323/grasshopper-ui/subscribers","subscription_url":"https://api.github.com/repos/bp323/grasshopper-ui/subscription","commits_url":"https://api.github.com/repos/bp323/grasshopper-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/bp323/grasshopper-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/bp323/grasshopper-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/bp323/grasshopper-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/bp323/grasshopper-ui/contents/{+path}","compare_url":"https://api.github.com/repos/bp323/grasshopper-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bp323/grasshopper-ui/merges","archive_url":"https://api.github.com/repos/bp323/grasshopper-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bp323/grasshopper-ui/downloads","issues_url":"https://api.github.com/repos/bp323/grasshopper-ui/issues{/number}","pulls_url":"https://api.github.com/repos/bp323/grasshopper-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/bp323/grasshopper-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/bp323/grasshopper-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bp323/grasshopper-ui/labels{/name}","releases_url":"https://api.github.com/repos/bp323/grasshopper-ui/releases{/id}","created_at":"2014-11-10T11:50:42Z","updated_at":"2015-02-04T12:05:54Z","pushed_at":"2015-02-04T16:57:33Z","git_url":"git://github.com/bp323/grasshopper-ui.git","ssh_url":"git@github.com:bp323/grasshopper-ui.git","clone_url":"https://github.com/bp323/grasshopper-ui.git","svn_url":"https://github.com/bp323/grasshopper-ui","homepage":null,"size":3118,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"CUL-DigitalServices:master","ref":"master","sha":"a02e3d4f7eee3d56ab5148429685ac0154690faf","user":{"login":"CUL-DigitalServices","id":5594563,"avatar_url":"https://avatars.githubusercontent.com/u/5594563?v=3","gravatar_id":"","url":"https://api.github.com/users/CUL-DigitalServices","html_url":"https://github.com/CUL-DigitalServices","followers_url":"https://api.github.com/users/CUL-DigitalServices/followers","following_url":"https://api.github.com/users/CUL-DigitalServices/following{/other_user}","gists_url":"https://api.github.com/users/CUL-DigitalServices/gists{/gist_id}","starred_url":"https://api.github.com/users/CUL-DigitalServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CUL-DigitalServices/subscriptions","organizations_url":"https://api.github.com/users/CUL-DigitalServices/orgs","repos_url":"https://api.github.com/users/CUL-DigitalServices/repos","events_url":"https://api.github.com/users/CUL-DigitalServices/events{/privacy}","received_events_url":"https://api.github.com/users/CUL-DigitalServices/received_events","type":"Organization","site_admin":false},"repo":{"id":26270238,"name":"grasshopper-ui","full_name":"CUL-DigitalServices/grasshopper-ui","owner":{"login":"CUL-DigitalServices","id":5594563,"avatar_url":"https://avatars.githubusercontent.com/u/5594563?v=3","gravatar_id":"","url":"https://api.github.com/users/CUL-DigitalServices","html_url":"https://github.com/CUL-DigitalServices","followers_url":"https://api.github.com/users/CUL-DigitalServices/followers","following_url":"https://api.github.com/users/CUL-DigitalServices/following{/other_user}","gists_url":"https://api.github.com/users/CUL-DigitalServices/gists{/gist_id}","starred_url":"https://api.github.com/users/CUL-DigitalServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CUL-DigitalServices/subscriptions","organizations_url":"https://api.github.com/users/CUL-DigitalServices/orgs","repos_url":"https://api.github.com/users/CUL-DigitalServices/repos","events_url":"https://api.github.com/users/CUL-DigitalServices/events{/privacy}","received_events_url":"https://api.github.com/users/CUL-DigitalServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CUL-DigitalServices/grasshopper-ui","description":"Grasshopper UI","fork":true,"url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui","forks_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/forks","keys_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/teams","hooks_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/hooks","issue_events_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues/events{/number}","events_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/events","assignees_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/assignees{/user}","branches_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/branches{/branch}","tags_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/tags","blobs_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/languages","stargazers_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/stargazers","contributors_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/contributors","subscribers_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/subscribers","subscription_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/subscription","commits_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/contents/{+path}","compare_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/merges","archive_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/downloads","issues_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues{/number}","pulls_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/labels{/name}","releases_url":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/releases{/id}","created_at":"2014-11-06T13:06:00Z","updated_at":"2015-02-04T16:50:34Z","pushed_at":"2015-02-04T16:50:34Z","git_url":"git://github.com/CUL-DigitalServices/grasshopper-ui.git","ssh_url":"git@github.com:CUL-DigitalServices/grasshopper-ui.git","clone_url":"https://github.com/CUL-DigitalServices/grasshopper-ui.git","svn_url":"https://github.com/CUL-DigitalServices/grasshopper-ui","homepage":null,"size":4462,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147"},"html":{"href":"https://github.com/CUL-DigitalServices/grasshopper-ui/pull/147"},"issue":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues/147"},"comments":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/CUL-DigitalServices/grasshopper-ui/statuses/9f88c1265be11e2562d2cf9b2ba93191228bedcb"}}}}