{"action":"created","comment":{"url":"https://api.github.com/repos/hapijs/joi/pulls/comments/48677660","id":48677660,"diff_hunk":"@@ -151,6 +182,32 @@ internals.Date.prototype.iso = function () {\n     return obj;\n };\n \n+internals.Date.prototype.timestamp = function (unit) {","path":"lib/date.js","position":92,"original_position":92,"commit_id":"ccbdd541fa456e5edf2ff56b97c3be363feacd40","original_commit_id":"ccbdd541fa456e5edf2ff56b97c3be363feacd40","user":{"login":"Marsup","id":796194,"avatar_url":"https://avatars.githubusercontent.com/u/796194?v=3","gravatar_id":"","url":"https://api.github.com/users/Marsup","html_url":"https://github.com/Marsup","followers_url":"https://api.github.com/users/Marsup/followers","following_url":"https://api.github.com/users/Marsup/following{/other_user}","gists_url":"https://api.github.com/users/Marsup/gists{/gist_id}","starred_url":"https://api.github.com/users/Marsup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marsup/subscriptions","organizations_url":"https://api.github.com/users/Marsup/orgs","repos_url":"https://api.github.com/users/Marsup/repos","events_url":"https://api.github.com/users/Marsup/events{/privacy}","received_events_url":"https://api.github.com/users/Marsup/received_events","type":"User","site_admin":false},"body":"There's already .unit(), I'm not sure that parameter adds much.","created_at":"2016-01-01T12:54:02Z","updated_at":"2016-01-01T12:54:02Z","html_url":"https://github.com/hapijs/joi/pull/791#discussion_r48677660","pull_request_url":"https://api.github.com/repos/hapijs/joi/pulls/791","_links":{"self":{"href":"https://api.github.com/repos/hapijs/joi/pulls/comments/48677660"},"html":{"href":"https://github.com/hapijs/joi/pull/791#discussion_r48677660"},"pull_request":{"href":"https://api.github.com/repos/hapijs/joi/pulls/791"}}},"pull_request":{"url":"https://api.github.com/repos/hapijs/joi/pulls/791","id":54878895,"html_url":"https://github.com/hapijs/joi/pull/791","diff_url":"https://github.com/hapijs/joi/pull/791.diff","patch_url":"https://github.com/hapijs/joi/pull/791.patch","issue_url":"https://api.github.com/repos/hapijs/joi/issues/791","number":791,"state":"open","locked":false,"title":"Date/Timestamp enhancements and support for Unix Timestamps","user":{"login":"galenandrew","id":796368,"avatar_url":"https://avatars.githubusercontent.com/u/796368?v=3","gravatar_id":"","url":"https://api.github.com/users/galenandrew","html_url":"https://github.com/galenandrew","followers_url":"https://api.github.com/users/galenandrew/followers","following_url":"https://api.github.com/users/galenandrew/following{/other_user}","gists_url":"https://api.github.com/users/galenandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/galenandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galenandrew/subscriptions","organizations_url":"https://api.github.com/users/galenandrew/orgs","repos_url":"https://api.github.com/users/galenandrew/repos","events_url":"https://api.github.com/users/galenandrew/events{/privacy}","received_events_url":"https://api.github.com/users/galenandrew/received_events","type":"User","site_admin":false},"body":"This PR includes the following changes:\r\n- Support for decimals in `date()` validation\r\n- New constraints for `date.timestamp()` and `date.unix()`\r\n- Updated Tests, API documentation, and added date example\r\n\r\n\r\n_Note: Because javascript timestamps are millisecond-based and unix timestamps are second-based, I've also added additional functionality to allow for explicitly setting the timestamp unit. This ensures proper date conversion for the given input value._\r\n\r\ncloses #789","created_at":"2015-12-31T20:16:52Z","updated_at":"2016-01-01T12:54:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb6a452a1557a79756372caa337e3467bfff1d68","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hapijs/joi/pulls/791/commits","review_comments_url":"https://api.github.com/repos/hapijs/joi/pulls/791/comments","review_comment_url":"https://api.github.com/repos/hapijs/joi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hapijs/joi/issues/791/comments","statuses_url":"https://api.github.com/repos/hapijs/joi/statuses/ccbdd541fa456e5edf2ff56b97c3be363feacd40","head":{"label":"galenandrew:timestamps","ref":"timestamps","sha":"ccbdd541fa456e5edf2ff56b97c3be363feacd40","user":{"login":"galenandrew","id":796368,"avatar_url":"https://avatars.githubusercontent.com/u/796368?v=3","gravatar_id":"","url":"https://api.github.com/users/galenandrew","html_url":"https://github.com/galenandrew","followers_url":"https://api.github.com/users/galenandrew/followers","following_url":"https://api.github.com/users/galenandrew/following{/other_user}","gists_url":"https://api.github.com/users/galenandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/galenandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galenandrew/subscriptions","organizations_url":"https://api.github.com/users/galenandrew/orgs","repos_url":"https://api.github.com/users/galenandrew/repos","events_url":"https://api.github.com/users/galenandrew/events{/privacy}","received_events_url":"https://api.github.com/users/galenandrew/received_events","type":"User","site_admin":false},"repo":{"id":48763993,"name":"joi","full_name":"galenandrew/joi","owner":{"login":"galenandrew","id":796368,"avatar_url":"https://avatars.githubusercontent.com/u/796368?v=3","gravatar_id":"","url":"https://api.github.com/users/galenandrew","html_url":"https://github.com/galenandrew","followers_url":"https://api.github.com/users/galenandrew/followers","following_url":"https://api.github.com/users/galenandrew/following{/other_user}","gists_url":"https://api.github.com/users/galenandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/galenandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galenandrew/subscriptions","organizations_url":"https://api.github.com/users/galenandrew/orgs","repos_url":"https://api.github.com/users/galenandrew/repos","events_url":"https://api.github.com/users/galenandrew/events{/privacy}","received_events_url":"https://api.github.com/users/galenandrew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/galenandrew/joi","description":"Object schema validation","fork":true,"url":"https://api.github.com/repos/galenandrew/joi","forks_url":"https://api.github.com/repos/galenandrew/joi/forks","keys_url":"https://api.github.com/repos/galenandrew/joi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/galenandrew/joi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/galenandrew/joi/teams","hooks_url":"https://api.github.com/repos/galenandrew/joi/hooks","issue_events_url":"https://api.github.com/repos/galenandrew/joi/issues/events{/number}","events_url":"https://api.github.com/repos/galenandrew/joi/events","assignees_url":"https://api.github.com/repos/galenandrew/joi/assignees{/user}","branches_url":"https://api.github.com/repos/galenandrew/joi/branches{/branch}","tags_url":"https://api.github.com/repos/galenandrew/joi/tags","blobs_url":"https://api.github.com/repos/galenandrew/joi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/galenandrew/joi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/galenandrew/joi/git/refs{/sha}","trees_url":"https://api.github.com/repos/galenandrew/joi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/galenandrew/joi/statuses/{sha}","languages_url":"https://api.github.com/repos/galenandrew/joi/languages","stargazers_url":"https://api.github.com/repos/galenandrew/joi/stargazers","contributors_url":"https://api.github.com/repos/galenandrew/joi/contributors","subscribers_url":"https://api.github.com/repos/galenandrew/joi/subscribers","subscription_url":"https://api.github.com/repos/galenandrew/joi/subscription","commits_url":"https://api.github.com/repos/galenandrew/joi/commits{/sha}","git_commits_url":"https://api.github.com/repos/galenandrew/joi/git/commits{/sha}","comments_url":"https://api.github.com/repos/galenandrew/joi/comments{/number}","issue_comment_url":"https://api.github.com/repos/galenandrew/joi/issues/comments{/number}","contents_url":"https://api.github.com/repos/galenandrew/joi/contents/{+path}","compare_url":"https://api.github.com/repos/galenandrew/joi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/galenandrew/joi/merges","archive_url":"https://api.github.com/repos/galenandrew/joi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/galenandrew/joi/downloads","issues_url":"https://api.github.com/repos/galenandrew/joi/issues{/number}","pulls_url":"https://api.github.com/repos/galenandrew/joi/pulls{/number}","milestones_url":"https://api.github.com/repos/galenandrew/joi/milestones{/number}","notifications_url":"https://api.github.com/repos/galenandrew/joi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/galenandrew/joi/labels{/name}","releases_url":"https://api.github.com/repos/galenandrew/joi/releases{/id}","created_at":"2015-12-29T19:36:53Z","updated_at":"2015-12-29T19:36:54Z","pushed_at":"2015-12-31T20:25:20Z","git_url":"git://github.com/galenandrew/joi.git","ssh_url":"git@github.com:galenandrew/joi.git","clone_url":"https://github.com/galenandrew/joi.git","svn_url":"https://github.com/galenandrew/joi","homepage":null,"size":2011,"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":"hapijs:master","ref":"master","sha":"1dda7da8e01d0a779d59f465466b5d46ab7275b9","user":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"repo":{"id":5830987,"name":"joi","full_name":"hapijs/joi","owner":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hapijs/joi","description":"Object schema validation","fork":false,"url":"https://api.github.com/repos/hapijs/joi","forks_url":"https://api.github.com/repos/hapijs/joi/forks","keys_url":"https://api.github.com/repos/hapijs/joi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hapijs/joi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hapijs/joi/teams","hooks_url":"https://api.github.com/repos/hapijs/joi/hooks","issue_events_url":"https://api.github.com/repos/hapijs/joi/issues/events{/number}","events_url":"https://api.github.com/repos/hapijs/joi/events","assignees_url":"https://api.github.com/repos/hapijs/joi/assignees{/user}","branches_url":"https://api.github.com/repos/hapijs/joi/branches{/branch}","tags_url":"https://api.github.com/repos/hapijs/joi/tags","blobs_url":"https://api.github.com/repos/hapijs/joi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hapijs/joi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hapijs/joi/git/refs{/sha}","trees_url":"https://api.github.com/repos/hapijs/joi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hapijs/joi/statuses/{sha}","languages_url":"https://api.github.com/repos/hapijs/joi/languages","stargazers_url":"https://api.github.com/repos/hapijs/joi/stargazers","contributors_url":"https://api.github.com/repos/hapijs/joi/contributors","subscribers_url":"https://api.github.com/repos/hapijs/joi/subscribers","subscription_url":"https://api.github.com/repos/hapijs/joi/subscription","commits_url":"https://api.github.com/repos/hapijs/joi/commits{/sha}","git_commits_url":"https://api.github.com/repos/hapijs/joi/git/commits{/sha}","comments_url":"https://api.github.com/repos/hapijs/joi/comments{/number}","issue_comment_url":"https://api.github.com/repos/hapijs/joi/issues/comments{/number}","contents_url":"https://api.github.com/repos/hapijs/joi/contents/{+path}","compare_url":"https://api.github.com/repos/hapijs/joi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hapijs/joi/merges","archive_url":"https://api.github.com/repos/hapijs/joi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hapijs/joi/downloads","issues_url":"https://api.github.com/repos/hapijs/joi/issues{/number}","pulls_url":"https://api.github.com/repos/hapijs/joi/pulls{/number}","milestones_url":"https://api.github.com/repos/hapijs/joi/milestones{/number}","notifications_url":"https://api.github.com/repos/hapijs/joi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hapijs/joi/labels{/name}","releases_url":"https://api.github.com/repos/hapijs/joi/releases{/id}","created_at":"2012-09-16T16:38:06Z","updated_at":"2015-12-31T19:47:44Z","pushed_at":"2015-12-31T20:25:21Z","git_url":"git://github.com/hapijs/joi.git","ssh_url":"git@github.com:hapijs/joi.git","clone_url":"https://github.com/hapijs/joi.git","svn_url":"https://github.com/hapijs/joi","homepage":null,"size":2539,"stargazers_count":2036,"watchers_count":2036,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":263,"mirror_url":null,"open_issues_count":20,"forks":263,"open_issues":20,"watchers":2036,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hapijs/joi/pulls/791"},"html":{"href":"https://github.com/hapijs/joi/pull/791"},"issue":{"href":"https://api.github.com/repos/hapijs/joi/issues/791"},"comments":{"href":"https://api.github.com/repos/hapijs/joi/issues/791/comments"},"review_comments":{"href":"https://api.github.com/repos/hapijs/joi/pulls/791/comments"},"review_comment":{"href":"https://api.github.com/repos/hapijs/joi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hapijs/joi/pulls/791/commits"},"statuses":{"href":"https://api.github.com/repos/hapijs/joi/statuses/ccbdd541fa456e5edf2ff56b97c3be363feacd40"}}}}