{"action":"created","comment":{"url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/comments/23584141","id":23584141,"diff_hunk":"@@ -0,0 +1,51 @@\n+module Data.Argonaut.Instances.Datetime (\n+  jsDate2Json,\n+  json2JSDate\n+  ) where\n+       \n+\n+import Data.Function\n+import Data.Maybe\n+import Data.Either\n+\n+import Data.Argonaut.Core\n+import Data.Argonaut.Encode\n+import Data.Argonaut.Decode\n+import Data.Date (fromJSDate, Date(), JSDate(), toJSDate)\n+\n+foreign import jsDate2Json \"\"\"\n+function jsDate2Json(date) {return date;}\n+\"\"\" :: JSDate -> Json\n+\n+instance encodeJsonDate :: EncodeJson JSDate where\n+  encodeJson = jsDate2Json\n+\n+instance encodeDate :: EncodeJson Date where\n+  encodeJson date = encodeJson $ toJSDate date\n+\n+foreign import json2JSDateImpl \"\"\"\n+function json2JSDateImpl(json, just, nothing) {\n+  if (json && json.constructor && json.constructor == Date) {\n+    return just(json); \n+  } else {\n+    return nothing;\n+  }\n+}\n+\"\"\" :: forall a. Fn3 Json (a -> Maybe a) (Maybe a) (Maybe JSDate)\n+\n+json2JSDate :: Json -> Maybe JSDate\n+json2JSDate json = runFn3 json2JSDateImpl json (Just) (Nothing)\n+\n+instance decodeJsonJSDate :: DecodeJson JSDate where","path":"src/Data/Argonaut/Instances/Datetime.purs","position":39,"original_position":39,"commit_id":"546c910efd1ee5c9453cd7bc4865c6b05a597eb3","original_commit_id":"546c910efd1ee5c9453cd7bc4865c6b05a597eb3","user":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"body":"These are currently orphan instances. They should be defined in the `EncodeJson` and `DecodeJson` modules to make sure they are not orphans.","created_at":"2015-01-27T02:53:05Z","updated_at":"2015-01-27T02:53:05Z","html_url":"https://github.com/purescript-contrib/purescript-argonaut/pull/12#discussion_r23584141","pull_request_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/comments/23584141"},"html":{"href":"https://github.com/purescript-contrib/purescript-argonaut/pull/12#discussion_r23584141"},"pull_request":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12","id":28079739,"html_url":"https://github.com/purescript-contrib/purescript-argonaut/pull/12","diff_url":"https://github.com/purescript-contrib/purescript-argonaut/pull/12.diff","patch_url":"https://github.com/purescript-contrib/purescript-argonaut/pull/12.patch","issue_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues/12","number":12,"state":"open","locked":false,"title":"Added date encode and decode instances","user":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-27T02:47:03Z","updated_at":"2015-01-27T02:53:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b29b474988383279ae43283a34d631323ddb570b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12/commits","review_comments_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12/comments","review_comment_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/comments/{number}","comments_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues/12/comments","statuses_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/statuses/546c910efd1ee5c9453cd7bc4865c6b05a597eb3","head":{"label":"cryogenian:master","ref":"master","sha":"546c910efd1ee5c9453cd7bc4865c6b05a597eb3","user":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/received_events","type":"User","site_admin":false},"repo":{"id":29889948,"name":"purescript-argonaut","full_name":"cryogenian/purescript-argonaut","owner":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cryogenian/purescript-argonaut","description":"PureScript implementation of argonaut","fork":true,"url":"https://api.github.com/repos/cryogenian/purescript-argonaut","forks_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/forks","keys_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/teams","hooks_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/hooks","issue_events_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/issues/events{/number}","events_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/events","assignees_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/assignees{/user}","branches_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/branches{/branch}","tags_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/tags","blobs_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/git/refs{/sha}","trees_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/statuses/{sha}","languages_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/languages","stargazers_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/stargazers","contributors_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/contributors","subscribers_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/subscribers","subscription_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/subscription","commits_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/commits{/sha}","git_commits_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/git/commits{/sha}","comments_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/comments{/number}","issue_comment_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/issues/comments/{number}","contents_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/contents/{+path}","compare_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/merges","archive_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/downloads","issues_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/issues{/number}","pulls_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/pulls{/number}","milestones_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/milestones{/number}","notifications_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/labels{/name}","releases_url":"https://api.github.com/repos/cryogenian/purescript-argonaut/releases{/id}","created_at":"2015-01-27T00:45:40Z","updated_at":"2015-01-27T02:43:48Z","pushed_at":"2015-01-27T02:43:48Z","git_url":"git://github.com/cryogenian/purescript-argonaut.git","ssh_url":"git@github.com:cryogenian/purescript-argonaut.git","clone_url":"https://github.com/cryogenian/purescript-argonaut.git","svn_url":"https://github.com/cryogenian/purescript-argonaut","homepage":"","size":511,"stargazers_count":0,"watchers_count":0,"language":"PureScript","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":"purescript-contrib:master","ref":"master","sha":"1c8c91e1fc256a6985637c2ad10be3c70a18bbb1","user":{"login":"purescript-contrib","id":7391813,"avatar_url":"https://avatars.githubusercontent.com/u/7391813?v=3","gravatar_id":"","url":"https://api.github.com/users/purescript-contrib","html_url":"https://github.com/purescript-contrib","followers_url":"https://api.github.com/users/purescript-contrib/followers","following_url":"https://api.github.com/users/purescript-contrib/following{/other_user}","gists_url":"https://api.github.com/users/purescript-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/purescript-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purescript-contrib/subscriptions","organizations_url":"https://api.github.com/users/purescript-contrib/orgs","repos_url":"https://api.github.com/users/purescript-contrib/repos","events_url":"https://api.github.com/users/purescript-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/purescript-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":22507763,"name":"purescript-argonaut","full_name":"purescript-contrib/purescript-argonaut","owner":{"login":"purescript-contrib","id":7391813,"avatar_url":"https://avatars.githubusercontent.com/u/7391813?v=3","gravatar_id":"","url":"https://api.github.com/users/purescript-contrib","html_url":"https://github.com/purescript-contrib","followers_url":"https://api.github.com/users/purescript-contrib/followers","following_url":"https://api.github.com/users/purescript-contrib/following{/other_user}","gists_url":"https://api.github.com/users/purescript-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/purescript-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purescript-contrib/subscriptions","organizations_url":"https://api.github.com/users/purescript-contrib/orgs","repos_url":"https://api.github.com/users/purescript-contrib/repos","events_url":"https://api.github.com/users/purescript-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/purescript-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/purescript-contrib/purescript-argonaut","description":"PureScript implementation of argonaut","fork":true,"url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut","forks_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/forks","keys_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/teams","hooks_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/hooks","issue_events_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues/events{/number}","events_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/events","assignees_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/assignees{/user}","branches_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/branches{/branch}","tags_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/tags","blobs_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/git/refs{/sha}","trees_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/statuses/{sha}","languages_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/languages","stargazers_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/stargazers","contributors_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/contributors","subscribers_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/subscribers","subscription_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/subscription","commits_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/commits{/sha}","git_commits_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/git/commits{/sha}","comments_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/comments{/number}","issue_comment_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues/comments/{number}","contents_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/contents/{+path}","compare_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/merges","archive_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/downloads","issues_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues{/number}","pulls_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls{/number}","milestones_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/milestones{/number}","notifications_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/labels{/name}","releases_url":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/releases{/id}","created_at":"2014-08-01T11:53:52Z","updated_at":"2015-01-26T17:45:31Z","pushed_at":"2015-01-20T13:41:15Z","git_url":"git://github.com/purescript-contrib/purescript-argonaut.git","ssh_url":"git@github.com:purescript-contrib/purescript-argonaut.git","clone_url":"https://github.com/purescript-contrib/purescript-argonaut.git","svn_url":"https://github.com/purescript-contrib/purescript-argonaut","homepage":"","size":511,"stargazers_count":4,"watchers_count":4,"language":"PureScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12"},"html":{"href":"https://github.com/purescript-contrib/purescript-argonaut/pull/12"},"issue":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues/12"},"comments":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/purescript-contrib/purescript-argonaut/statuses/546c910efd1ee5c9453cd7bc4865c6b05a597eb3"}}}}