{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/o-date/pulls/comments/72773207","id":72773207,"diff_hunk":"@@ -152,17 +151,59 @@ describe('o-date', () => {\n \t\t});\n \n \t\tit('returns a result from ODate.timeAgo if ODate.isToday returns true', () => {\n-\t\t\tconst oDateFormatReturn = \"mocked timeAgo date\";\n+\t\t\tconst oDateTimeAgoReturn = \"mocked timeAgo date\";\n \t\t\tspyOn(oDate, 'isNearFuture').and.returnValue(false);\n \t\t\tspyOn(oDate, 'isFarFuture').and.returnValue(false);\n \t\t\tspyOn(oDate, 'isToday').and.returnValue(true);\n \n-\t\t\tspyOn(oDate, 'timeAgo').and.returnValue(oDateFormatReturn);\n+\t\t\tspyOn(oDate, 'timeAgo').and.returnValue(oDateTimeAgoReturn);\n \n-\t\t\texpect(oDate.ftTime(someDate)).toBe(oDateFormatReturn);\n+\t\t\texpect(oDate.ftTime(someDate)).toBe(oDateTimeAgoReturn);\n \t\t\texpect(oDate.timeAgo).toHaveBeenCalledWith(someDate, jasmine.any(Date), jasmine.any(Number));\n \t\t});\n \n+\t\tit('returns a result from timeAgo if the publish date is less than 4 hours ago even if that date is also yesterday', ()=>{\n+\t\t\tconst oDateTimeAgoReturn = \"mocked timeAgo date\";\n+\t\t\tspyOn(oDate, 'timeAgo').and.returnValue(oDateTimeAgoReturn);\n+\n+\t\t\tlet publishDatesInTheLast4Hours =","path":"test/date.test.js","position":30,"original_position":30,"commit_id":"9a375bb6e90b237a15b5b1150b56f0a428a885fb","original_commit_id":"9a375bb6e90b237a15b5b1150b56f0a428a885fb","user":{"login":"rowanmanning","id":138944,"avatar_url":"https://avatars.githubusercontent.com/u/138944?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmanning","html_url":"https://github.com/rowanmanning","followers_url":"https://api.github.com/users/rowanmanning/followers","following_url":"https://api.github.com/users/rowanmanning/following{/other_user}","gists_url":"https://api.github.com/users/rowanmanning/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmanning/subscriptions","organizations_url":"https://api.github.com/users/rowanmanning/orgs","repos_url":"https://api.github.com/users/rowanmanning/repos","events_url":"https://api.github.com/users/rowanmanning/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmanning/received_events","type":"User","site_admin":false},"body":"Slightly inconsistent spacing but no big deal. Also I think nearly all of your variables can be `const` in here","created_at":"2016-07-29T10:36:11Z","updated_at":"2016-07-29T10:36:11Z","html_url":"https://github.com/Financial-Times/o-date/pull/61#discussion_r72773207","pull_request_url":"https://api.github.com/repos/Financial-Times/o-date/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/o-date/pulls/comments/72773207"},"html":{"href":"https://github.com/Financial-Times/o-date/pull/61#discussion_r72773207"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/o-date/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/o-date/pulls/61","id":79245877,"html_url":"https://github.com/Financial-Times/o-date/pull/61","diff_url":"https://github.com/Financial-Times/o-date/pull/61.diff","patch_url":"https://github.com/Financial-Times/o-date/pull/61.patch","issue_url":"https://api.github.com/repos/Financial-Times/o-date/issues/61","number":61,"state":"open","locked":false,"title":"Fix yesterday","user":{"login":"alicebartlett","id":68009,"avatar_url":"https://avatars.githubusercontent.com/u/68009?v=3","gravatar_id":"","url":"https://api.github.com/users/alicebartlett","html_url":"https://github.com/alicebartlett","followers_url":"https://api.github.com/users/alicebartlett/followers","following_url":"https://api.github.com/users/alicebartlett/following{/other_user}","gists_url":"https://api.github.com/users/alicebartlett/gists{/gist_id}","starred_url":"https://api.github.com/users/alicebartlett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicebartlett/subscriptions","organizations_url":"https://api.github.com/users/alicebartlett/orgs","repos_url":"https://api.github.com/users/alicebartlett/repos","events_url":"https://api.github.com/users/alicebartlett/events{/privacy}","received_events_url":"https://api.github.com/users/alicebartlett/received_events","type":"User","site_admin":false},"body":"Currently the date is only displayed in a TimeAgo format if the publish date was\r\nsometime today and in the past.\r\nThis leads to things like stories being published at 23:55 displaying as 'yesterday'\r\neven if viewed only 10 minutes later.\r\n\r\nThis commit changes the behaviour to always show timeAgo() if the publish date\r\nwas within the last 4 hours, regardless of the date. After that the date will be\r\ndisplayed as timeAgo() if the publish date was today, or 'yesterday' if the publish\r\ndate was yesterday and more than 4 hours ago.\r\n\r\nThis would fix #55 ","created_at":"2016-07-28T18:35:08Z","updated_at":"2016-07-29T10:36:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb40eb8a3ad6f475974cb2d132f9fcead65b310d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/o-date/pulls/61/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/o-date/pulls/61/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/o-date/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/o-date/issues/61/comments","statuses_url":"https://api.github.com/repos/Financial-Times/o-date/statuses/9a375bb6e90b237a15b5b1150b56f0a428a885fb","head":{"label":"Financial-Times:fix-yesterday","ref":"fix-yesterday","sha":"9a375bb6e90b237a15b5b1150b56f0a428a885fb","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":18879189,"name":"o-date","full_name":"Financial-Times/o-date","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/o-date","description":"Javascript utilities for formatting and updating dates in FT style","fork":false,"url":"https://api.github.com/repos/Financial-Times/o-date","forks_url":"https://api.github.com/repos/Financial-Times/o-date/forks","keys_url":"https://api.github.com/repos/Financial-Times/o-date/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/o-date/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/o-date/teams","hooks_url":"https://api.github.com/repos/Financial-Times/o-date/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/o-date/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/o-date/events","assignees_url":"https://api.github.com/repos/Financial-Times/o-date/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/o-date/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/o-date/tags","blobs_url":"https://api.github.com/repos/Financial-Times/o-date/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/o-date/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/o-date/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/o-date/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/o-date/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/o-date/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/o-date/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/o-date/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/o-date/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/o-date/subscription","commits_url":"https://api.github.com/repos/Financial-Times/o-date/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/o-date/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/o-date/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/o-date/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/o-date/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/o-date/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/o-date/merges","archive_url":"https://api.github.com/repos/Financial-Times/o-date/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/o-date/downloads","issues_url":"https://api.github.com/repos/Financial-Times/o-date/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/o-date/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/o-date/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/o-date/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/o-date/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/o-date/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/o-date/deployments","created_at":"2014-04-17T13:26:23Z","updated_at":"2016-01-12T12:09:18Z","pushed_at":"2016-07-29T10:24:07Z","git_url":"git://github.com/Financial-Times/o-date.git","ssh_url":"git@github.com:Financial-Times/o-date.git","clone_url":"https://github.com/Financial-Times/o-date.git","svn_url":"https://github.com/Financial-Times/o-date","homepage":"registry.origami.ft.com/components/o-date","size":141,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"1a79f81c0a464761a48b067061193e47ded5c54b","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":18879189,"name":"o-date","full_name":"Financial-Times/o-date","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/o-date","description":"Javascript utilities for formatting and updating dates in FT style","fork":false,"url":"https://api.github.com/repos/Financial-Times/o-date","forks_url":"https://api.github.com/repos/Financial-Times/o-date/forks","keys_url":"https://api.github.com/repos/Financial-Times/o-date/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/o-date/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/o-date/teams","hooks_url":"https://api.github.com/repos/Financial-Times/o-date/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/o-date/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/o-date/events","assignees_url":"https://api.github.com/repos/Financial-Times/o-date/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/o-date/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/o-date/tags","blobs_url":"https://api.github.com/repos/Financial-Times/o-date/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/o-date/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/o-date/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/o-date/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/o-date/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/o-date/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/o-date/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/o-date/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/o-date/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/o-date/subscription","commits_url":"https://api.github.com/repos/Financial-Times/o-date/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/o-date/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/o-date/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/o-date/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/o-date/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/o-date/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/o-date/merges","archive_url":"https://api.github.com/repos/Financial-Times/o-date/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/o-date/downloads","issues_url":"https://api.github.com/repos/Financial-Times/o-date/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/o-date/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/o-date/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/o-date/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/o-date/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/o-date/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/o-date/deployments","created_at":"2014-04-17T13:26:23Z","updated_at":"2016-01-12T12:09:18Z","pushed_at":"2016-07-29T10:24:07Z","git_url":"git://github.com/Financial-Times/o-date.git","ssh_url":"git@github.com:Financial-Times/o-date.git","clone_url":"https://github.com/Financial-Times/o-date.git","svn_url":"https://github.com/Financial-Times/o-date","homepage":"registry.origami.ft.com/components/o-date","size":141,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/o-date/pulls/61"},"html":{"href":"https://github.com/Financial-Times/o-date/pull/61"},"issue":{"href":"https://api.github.com/repos/Financial-Times/o-date/issues/61"},"comments":{"href":"https://api.github.com/repos/Financial-Times/o-date/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/o-date/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/o-date/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/o-date/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/o-date/statuses/9a375bb6e90b237a15b5b1150b56f0a428a885fb"}}}}
{"actor":{"display_login":"rowanmanning"}}