{"action":"created","comment":{"url":"https://api.github.com/repos/artsy/metaphysics/pulls/comments/62051425","id":62051425,"diff_hunk":"@@ -0,0 +1,31 @@\n+import moment from 'moment';\n+import { exhibitionPeriod } from '../../lib/date';\n+\n+describe('date', () => {\n+  describe('exhibitionPeriod', () => {\n+    it('includes the start and end date', () => {\n+      const period = exhibitionPeriod(moment('2011-01-12'), moment('2014-04-19'))\n+      period.should.equal('January 12th, 2011 - April 19th, 2014');\n+    });\n+\n+    it('does not include the year of the start date if it’s the same year as the end date', () => {\n+      const period = exhibitionPeriod(moment('2011-01-12'), moment('2011-04-19'))\n+      period.should.equal('January 12th - April 19th, 2011');\n+    });\n+\n+    it('does not include the month of the end date if it’s the same as the start date', () => {\n+      const period = exhibitionPeriod(moment('2011-01-12'), moment('2011-01-19'))\n+      period.should.equal('January 12th - 19th, 2011');\n+    });\n+\n+    it('does not include the year of the end date if it’s in the current year', () => {\n+      const period = exhibitionPeriod(moment('2011-01-12'), moment().format('YYYY-04-19'))\n+      period.should.equal('January 12th, 2011 - April 19th');\n+    });\n+\n+    it('does not include a year at all if both start and end date are in the current year', () => {\n+      const period = exhibitionPeriod(moment().format('YYYY-01-12'), moment().format('YYYY-01-19'))\n+      period.should.equal('January 12th - 19th');\n+    });\n+  });\n+});","path":"test/lib/date.js","position":31,"original_position":31,"commit_id":"bde01b2d202c30748fa14301cacb5227ed92e4e0","original_commit_id":"bde01b2d202c30748fa14301cacb5227ed92e4e0","user":{"login":"dzucconi","id":112297,"avatar_url":"https://avatars.githubusercontent.com/u/112297?v=3","gravatar_id":"","url":"https://api.github.com/users/dzucconi","html_url":"https://github.com/dzucconi","followers_url":"https://api.github.com/users/dzucconi/followers","following_url":"https://api.github.com/users/dzucconi/following{/other_user}","gists_url":"https://api.github.com/users/dzucconi/gists{/gist_id}","starred_url":"https://api.github.com/users/dzucconi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzucconi/subscriptions","organizations_url":"https://api.github.com/users/dzucconi/orgs","repos_url":"https://api.github.com/users/dzucconi/repos","events_url":"https://api.github.com/users/dzucconi/events{/privacy}","received_events_url":"https://api.github.com/users/dzucconi/received_events","type":"User","site_admin":false},"body":"I spoke with @briansw about where we want to land on unifying the date range formatting:\r\n\r\n<img width=\"710\" alt=\"screen shot 2016-05-04 at 10 42 56 am\" src=\"https://cloud.githubusercontent.com/assets/112297/15017793/21f045ec-11e5-11e6-9de8-f9e04d6cbe4c.png\">\r\n","created_at":"2016-05-04T14:44:13Z","updated_at":"2016-05-04T14:44:13Z","html_url":"https://github.com/artsy/metaphysics/pull/226#discussion_r62051425","pull_request_url":"https://api.github.com/repos/artsy/metaphysics/pulls/226","_links":{"self":{"href":"https://api.github.com/repos/artsy/metaphysics/pulls/comments/62051425"},"html":{"href":"https://github.com/artsy/metaphysics/pull/226#discussion_r62051425"},"pull_request":{"href":"https://api.github.com/repos/artsy/metaphysics/pulls/226"}}},"pull_request":{"url":"https://api.github.com/repos/artsy/metaphysics/pulls/226","id":68787241,"html_url":"https://github.com/artsy/metaphysics/pull/226","diff_url":"https://github.com/artsy/metaphysics/pull/226.diff","patch_url":"https://github.com/artsy/metaphysics/pull/226.patch","issue_url":"https://api.github.com/repos/artsy/metaphysics/issues/226","number":226,"state":"open","locked":false,"title":"[WIP] Missing shows data.","user":{"login":"alloy","id":2320,"avatar_url":"https://avatars.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"body":"This is for https://github.com/artsy/emission/issues/11","created_at":"2016-05-03T22:43:28Z","updated_at":"2016-05-04T14:44:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52b5dcd7887ccb01cf7a62f00a2aa0bf7c3d1bb6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artsy/metaphysics/pulls/226/commits","review_comments_url":"https://api.github.com/repos/artsy/metaphysics/pulls/226/comments","review_comment_url":"https://api.github.com/repos/artsy/metaphysics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsy/metaphysics/issues/226/comments","statuses_url":"https://api.github.com/repos/artsy/metaphysics/statuses/bde01b2d202c30748fa14301cacb5227ed92e4e0","head":{"label":"alloy:shows","ref":"shows","sha":"bde01b2d202c30748fa14301cacb5227ed92e4e0","user":{"login":"alloy","id":2320,"avatar_url":"https://avatars.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"repo":{"id":55077373,"name":"metaphysics","full_name":"alloy/metaphysics","owner":{"login":"alloy","id":2320,"avatar_url":"https://avatars.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alloy/metaphysics","description":"Artsy's GraphQL API","fork":true,"url":"https://api.github.com/repos/alloy/metaphysics","forks_url":"https://api.github.com/repos/alloy/metaphysics/forks","keys_url":"https://api.github.com/repos/alloy/metaphysics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alloy/metaphysics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alloy/metaphysics/teams","hooks_url":"https://api.github.com/repos/alloy/metaphysics/hooks","issue_events_url":"https://api.github.com/repos/alloy/metaphysics/issues/events{/number}","events_url":"https://api.github.com/repos/alloy/metaphysics/events","assignees_url":"https://api.github.com/repos/alloy/metaphysics/assignees{/user}","branches_url":"https://api.github.com/repos/alloy/metaphysics/branches{/branch}","tags_url":"https://api.github.com/repos/alloy/metaphysics/tags","blobs_url":"https://api.github.com/repos/alloy/metaphysics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alloy/metaphysics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alloy/metaphysics/git/refs{/sha}","trees_url":"https://api.github.com/repos/alloy/metaphysics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alloy/metaphysics/statuses/{sha}","languages_url":"https://api.github.com/repos/alloy/metaphysics/languages","stargazers_url":"https://api.github.com/repos/alloy/metaphysics/stargazers","contributors_url":"https://api.github.com/repos/alloy/metaphysics/contributors","subscribers_url":"https://api.github.com/repos/alloy/metaphysics/subscribers","subscription_url":"https://api.github.com/repos/alloy/metaphysics/subscription","commits_url":"https://api.github.com/repos/alloy/metaphysics/commits{/sha}","git_commits_url":"https://api.github.com/repos/alloy/metaphysics/git/commits{/sha}","comments_url":"https://api.github.com/repos/alloy/metaphysics/comments{/number}","issue_comment_url":"https://api.github.com/repos/alloy/metaphysics/issues/comments{/number}","contents_url":"https://api.github.com/repos/alloy/metaphysics/contents/{+path}","compare_url":"https://api.github.com/repos/alloy/metaphysics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alloy/metaphysics/merges","archive_url":"https://api.github.com/repos/alloy/metaphysics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alloy/metaphysics/downloads","issues_url":"https://api.github.com/repos/alloy/metaphysics/issues{/number}","pulls_url":"https://api.github.com/repos/alloy/metaphysics/pulls{/number}","milestones_url":"https://api.github.com/repos/alloy/metaphysics/milestones{/number}","notifications_url":"https://api.github.com/repos/alloy/metaphysics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alloy/metaphysics/labels{/name}","releases_url":"https://api.github.com/repos/alloy/metaphysics/releases{/id}","deployments_url":"https://api.github.com/repos/alloy/metaphysics/deployments","created_at":"2016-03-30T16:04:35Z","updated_at":"2016-03-30T16:04:40Z","pushed_at":"2016-05-04T12:29:22Z","git_url":"git://github.com/alloy/metaphysics.git","ssh_url":"git@github.com:alloy/metaphysics.git","clone_url":"https://github.com/alloy/metaphysics.git","svn_url":"https://github.com/alloy/metaphysics","homepage":"","size":523,"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":"artsy:master","ref":"master","sha":"11d272a8ee28a62364dfb6feea31bef21ca820c8","user":{"login":"artsy","id":546231,"avatar_url":"https://avatars.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":42728510,"name":"metaphysics","full_name":"artsy/metaphysics","owner":{"login":"artsy","id":546231,"avatar_url":"https://avatars.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artsy/metaphysics","description":"Artsy's GraphQL API","fork":false,"url":"https://api.github.com/repos/artsy/metaphysics","forks_url":"https://api.github.com/repos/artsy/metaphysics/forks","keys_url":"https://api.github.com/repos/artsy/metaphysics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/metaphysics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/metaphysics/teams","hooks_url":"https://api.github.com/repos/artsy/metaphysics/hooks","issue_events_url":"https://api.github.com/repos/artsy/metaphysics/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/metaphysics/events","assignees_url":"https://api.github.com/repos/artsy/metaphysics/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/metaphysics/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/metaphysics/tags","blobs_url":"https://api.github.com/repos/artsy/metaphysics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/metaphysics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/metaphysics/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/metaphysics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/metaphysics/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/metaphysics/languages","stargazers_url":"https://api.github.com/repos/artsy/metaphysics/stargazers","contributors_url":"https://api.github.com/repos/artsy/metaphysics/contributors","subscribers_url":"https://api.github.com/repos/artsy/metaphysics/subscribers","subscription_url":"https://api.github.com/repos/artsy/metaphysics/subscription","commits_url":"https://api.github.com/repos/artsy/metaphysics/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/metaphysics/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/metaphysics/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/metaphysics/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/metaphysics/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/metaphysics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/metaphysics/merges","archive_url":"https://api.github.com/repos/artsy/metaphysics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/metaphysics/downloads","issues_url":"https://api.github.com/repos/artsy/metaphysics/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/metaphysics/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/metaphysics/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/metaphysics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/metaphysics/labels{/name}","releases_url":"https://api.github.com/repos/artsy/metaphysics/releases{/id}","deployments_url":"https://api.github.com/repos/artsy/metaphysics/deployments","created_at":"2015-09-18T14:51:48Z","updated_at":"2016-04-26T04:17:28Z","pushed_at":"2016-05-04T12:29:22Z","git_url":"git://github.com/artsy/metaphysics.git","ssh_url":"git@github.com:artsy/metaphysics.git","clone_url":"https://github.com/artsy/metaphysics.git","svn_url":"https://github.com/artsy/metaphysics","homepage":"","size":519,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":15,"forks":11,"open_issues":15,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsy/metaphysics/pulls/226"},"html":{"href":"https://github.com/artsy/metaphysics/pull/226"},"issue":{"href":"https://api.github.com/repos/artsy/metaphysics/issues/226"},"comments":{"href":"https://api.github.com/repos/artsy/metaphysics/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/artsy/metaphysics/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/artsy/metaphysics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsy/metaphysics/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/artsy/metaphysics/statuses/bde01b2d202c30748fa14301cacb5227ed92e4e0"}}}}