{"action":"created","comment":{"url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments/46360981","id":46360981,"diff_hunk":"@@ -49,4 +49,39 @@ describe('objects', () => {\n     assert.deepEqual(Page.fromRaw({data: 1, before: 2, after: 3}), new Page(1, 2, 3))\n     assert.deepEqual(new Page([1, 2, 3], 2, 3).mapData(_ => _ + 1), new Page([2, 3, 4], 2, 3))\n   })\n+\n+  it('time conversion', () => {\n+    const dt = new Date()\n+    assert.deepEqual(new FaunaTime(dt).date, dt)\n+\n+    const epoch = new Date(Date.UTC(1970, 0, 1))\n+    const ft = new FaunaTime(epoch)\n+    assert.deepEqual(ft, new FaunaTime('1970-01-01T00:00:00.000Z'))\n+    assert.deepEqual(ft.date, epoch)\n+  })\n+\n+  it('time', () => {\n+      const test_ts = new FaunaTime('1970-01-01T00:00:00.123456789Z')","path":"test/objects_test.js","position":24,"original_position":24,"commit_id":"21922e8afe629d3e0cbb82ccb99c2196bd819959","original_commit_id":"21922e8afe629d3e0cbb82ccb99c2196bd819959","user":{"login":"eaceaser","id":157866,"avatar_url":"https://avatars.githubusercontent.com/u/157866?v=3","gravatar_id":"","url":"https://api.github.com/users/eaceaser","html_url":"https://github.com/eaceaser","followers_url":"https://api.github.com/users/eaceaser/followers","following_url":"https://api.github.com/users/eaceaser/following{/other_user}","gists_url":"https://api.github.com/users/eaceaser/gists{/gist_id}","starred_url":"https://api.github.com/users/eaceaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaceaser/subscriptions","organizations_url":"https://api.github.com/users/eaceaser/orgs","repos_url":"https://api.github.com/users/eaceaser/repos","events_url":"https://api.github.com/users/eaceaser/events{/privacy}","received_events_url":"https://api.github.com/users/eaceaser/received_events","type":"User","site_admin":false},"body":"i guess maybe the issue is more that the date() and time() functions take strings themselves; we should probably have a version that takes a Date object and converts it to the appropriate ISO string? \r\n\r\nthe client feels like it needs some form of bridge from the native date/time types to what fauna expects.","created_at":"2015-12-02T00:17:23Z","updated_at":"2015-12-02T00:17:23Z","html_url":"https://github.com/faunadb/faunadb-js/pull/37#discussion_r46360981","pull_request_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments/46360981"},"html":{"href":"https://github.com/faunadb/faunadb-js/pull/37#discussion_r46360981"},"pull_request":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37","id":50566286,"html_url":"https://github.com/faunadb/faunadb-js/pull/37","diff_url":"https://github.com/faunadb/faunadb-js/pull/37.diff","patch_url":"https://github.com/faunadb/faunadb-js/pull/37.patch","issue_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/37","number":37,"state":"open","locked":false,"title":"Add @ts and @date decode/encode and date/time functions","user":{"login":"andy-faunadb","id":13004842,"avatar_url":"https://avatars.githubusercontent.com/u/13004842?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-faunadb","html_url":"https://github.com/andy-faunadb","followers_url":"https://api.github.com/users/andy-faunadb/followers","following_url":"https://api.github.com/users/andy-faunadb/following{/other_user}","gists_url":"https://api.github.com/users/andy-faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-faunadb/subscriptions","organizations_url":"https://api.github.com/users/andy-faunadb/orgs","repos_url":"https://api.github.com/users/andy-faunadb/repos","events_url":"https://api.github.com/users/andy-faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/andy-faunadb/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-12T20:54:08Z","updated_at":"2015-12-02T00:17:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1843a44b863e392afd7c1003d28a2d64b9ba7f3","assignee":{"login":"eaceaser","id":157866,"avatar_url":"https://avatars.githubusercontent.com/u/157866?v=3","gravatar_id":"","url":"https://api.github.com/users/eaceaser","html_url":"https://github.com/eaceaser","followers_url":"https://api.github.com/users/eaceaser/followers","following_url":"https://api.github.com/users/eaceaser/following{/other_user}","gists_url":"https://api.github.com/users/eaceaser/gists{/gist_id}","starred_url":"https://api.github.com/users/eaceaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaceaser/subscriptions","organizations_url":"https://api.github.com/users/eaceaser/orgs","repos_url":"https://api.github.com/users/eaceaser/repos","events_url":"https://api.github.com/users/eaceaser/events{/privacy}","received_events_url":"https://api.github.com/users/eaceaser/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37/commits","review_comments_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37/comments","review_comment_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/37/comments","statuses_url":"https://api.github.com/repos/faunadb/faunadb-js/statuses/21922e8afe629d3e0cbb82ccb99c2196bd819959","head":{"label":"faunadb:time","ref":"time","sha":"21922e8afe629d3e0cbb82ccb99c2196bd819959","user":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"repo":{"id":43472750,"name":"faunadb-js","full_name":"faunadb/faunadb-js","owner":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/faunadb/faunadb-js","description":"Node.js client for FaunaDB","fork":false,"url":"https://api.github.com/repos/faunadb/faunadb-js","forks_url":"https://api.github.com/repos/faunadb/faunadb-js/forks","keys_url":"https://api.github.com/repos/faunadb/faunadb-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faunadb/faunadb-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faunadb/faunadb-js/teams","hooks_url":"https://api.github.com/repos/faunadb/faunadb-js/hooks","issue_events_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/events{/number}","events_url":"https://api.github.com/repos/faunadb/faunadb-js/events","assignees_url":"https://api.github.com/repos/faunadb/faunadb-js/assignees{/user}","branches_url":"https://api.github.com/repos/faunadb/faunadb-js/branches{/branch}","tags_url":"https://api.github.com/repos/faunadb/faunadb-js/tags","blobs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faunadb/faunadb-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/faunadb/faunadb-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faunadb/faunadb-js/statuses/{sha}","languages_url":"https://api.github.com/repos/faunadb/faunadb-js/languages","stargazers_url":"https://api.github.com/repos/faunadb/faunadb-js/stargazers","contributors_url":"https://api.github.com/repos/faunadb/faunadb-js/contributors","subscribers_url":"https://api.github.com/repos/faunadb/faunadb-js/subscribers","subscription_url":"https://api.github.com/repos/faunadb/faunadb-js/subscription","commits_url":"https://api.github.com/repos/faunadb/faunadb-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/faunadb/faunadb-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/faunadb/faunadb-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/faunadb/faunadb-js/contents/{+path}","compare_url":"https://api.github.com/repos/faunadb/faunadb-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faunadb/faunadb-js/merges","archive_url":"https://api.github.com/repos/faunadb/faunadb-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faunadb/faunadb-js/downloads","issues_url":"https://api.github.com/repos/faunadb/faunadb-js/issues{/number}","pulls_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls{/number}","milestones_url":"https://api.github.com/repos/faunadb/faunadb-js/milestones{/number}","notifications_url":"https://api.github.com/repos/faunadb/faunadb-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faunadb/faunadb-js/labels{/name}","releases_url":"https://api.github.com/repos/faunadb/faunadb-js/releases{/id}","created_at":"2015-10-01T01:36:40Z","updated_at":"2015-11-09T17:36:13Z","pushed_at":"2015-12-01T23:52:02Z","git_url":"git://github.com/faunadb/faunadb-js.git","ssh_url":"git@github.com:faunadb/faunadb-js.git","clone_url":"https://github.com/faunadb/faunadb-js.git","svn_url":"https://github.com/faunadb/faunadb-js","homepage":null,"size":835,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"faunadb:master","ref":"master","sha":"627e697e43472727e45ec773a1332501217eead2","user":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"repo":{"id":43472750,"name":"faunadb-js","full_name":"faunadb/faunadb-js","owner":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/faunadb/faunadb-js","description":"Node.js client for FaunaDB","fork":false,"url":"https://api.github.com/repos/faunadb/faunadb-js","forks_url":"https://api.github.com/repos/faunadb/faunadb-js/forks","keys_url":"https://api.github.com/repos/faunadb/faunadb-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faunadb/faunadb-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faunadb/faunadb-js/teams","hooks_url":"https://api.github.com/repos/faunadb/faunadb-js/hooks","issue_events_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/events{/number}","events_url":"https://api.github.com/repos/faunadb/faunadb-js/events","assignees_url":"https://api.github.com/repos/faunadb/faunadb-js/assignees{/user}","branches_url":"https://api.github.com/repos/faunadb/faunadb-js/branches{/branch}","tags_url":"https://api.github.com/repos/faunadb/faunadb-js/tags","blobs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faunadb/faunadb-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/faunadb/faunadb-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faunadb/faunadb-js/statuses/{sha}","languages_url":"https://api.github.com/repos/faunadb/faunadb-js/languages","stargazers_url":"https://api.github.com/repos/faunadb/faunadb-js/stargazers","contributors_url":"https://api.github.com/repos/faunadb/faunadb-js/contributors","subscribers_url":"https://api.github.com/repos/faunadb/faunadb-js/subscribers","subscription_url":"https://api.github.com/repos/faunadb/faunadb-js/subscription","commits_url":"https://api.github.com/repos/faunadb/faunadb-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/faunadb/faunadb-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/faunadb/faunadb-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/faunadb/faunadb-js/contents/{+path}","compare_url":"https://api.github.com/repos/faunadb/faunadb-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faunadb/faunadb-js/merges","archive_url":"https://api.github.com/repos/faunadb/faunadb-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faunadb/faunadb-js/downloads","issues_url":"https://api.github.com/repos/faunadb/faunadb-js/issues{/number}","pulls_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls{/number}","milestones_url":"https://api.github.com/repos/faunadb/faunadb-js/milestones{/number}","notifications_url":"https://api.github.com/repos/faunadb/faunadb-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faunadb/faunadb-js/labels{/name}","releases_url":"https://api.github.com/repos/faunadb/faunadb-js/releases{/id}","created_at":"2015-10-01T01:36:40Z","updated_at":"2015-11-09T17:36:13Z","pushed_at":"2015-12-01T23:52:02Z","git_url":"git://github.com/faunadb/faunadb-js.git","ssh_url":"git@github.com:faunadb/faunadb-js.git","clone_url":"https://github.com/faunadb/faunadb-js.git","svn_url":"https://github.com/faunadb/faunadb-js","homepage":null,"size":835,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37"},"html":{"href":"https://github.com/faunadb/faunadb-js/pull/37"},"issue":{"href":"https://api.github.com/repos/faunadb/faunadb-js/issues/37"},"comments":{"href":"https://api.github.com/repos/faunadb/faunadb-js/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/faunadb/faunadb-js/statuses/21922e8afe629d3e0cbb82ccb99c2196bd819959"}}}}