{"action":"created","comment":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/34017852","id":34017852,"diff_hunk":"@@ -324,25 +325,118 @@ ecma_builtin_date_now (ecma_value_t this_arg) /**< this argument */\n /**\n  * Handle calling [[Call]] of built-in Date object\n  *\n+ * See also:\n+ *          ECMA-262 v5, 15.9.2.1\n+ *\n  * @return completion-value\n  */\n ecma_completion_value_t\n-ecma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */\n-                                 ecma_length_t arguments_list_len) /**< number of arguments */\n+ecma_builtin_date_dispatch_call (const ecma_value_t *args_list_p, /**< arguments list */\n+                                 ecma_length_t args_len) /**< number of arguments */\n {\n-  ECMA_BUILTIN_CP_UNIMPLEMENTED (arguments_list_p, arguments_list_len);\n+  /* FIXME:\n+   *       Fix this, after Date.prototype.toString is finished.\n+   */\n+  return ecma_builtin_date_dispatch_construct (args_list_p, args_len);\n } /* ecma_builtin_date_dispatch_call */\n \n /**\n  * Handle calling [[Construct]] of built-in Date object\n  *\n+ * See also:\n+ *          ECMA-262 v5, 15.9.3.1\n+ *\n  * @return completion-value\n  */\n ecma_completion_value_t\n-ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */\n-                                      ecma_length_t arguments_list_len) /**< number of arguments */\n+ecma_builtin_date_dispatch_construct (const ecma_value_t *args_list_p, /**< arguments list */\n+                                      ecma_length_t args_len) /**< number of arguments */\n {\n-  ECMA_BUILTIN_CP_UNIMPLEMENTED (arguments_list_p, arguments_list_len);\n+  ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();\n+  ecma_number_t *prim_value_num_p;\n+\n+  ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_DATE_PROTOTYPE);\n+  ecma_object_t *obj_p = ecma_create_object (prototype_obj_p,\n+                                             true,\n+                                             ECMA_OBJECT_TYPE_GENERAL);\n+  ecma_deref_object (prototype_obj_p);\n+\n+  if (args_len == 0)\n+  {\n+    ECMA_TRY_CATCH (parse_res_value,\n+                    ecma_builtin_date_now (ecma_make_object_value (obj_p)),\n+                    ret_value);\n+\n+    prim_value_num_p= ecma_alloc_number ();\n+    *prim_value_num_p = *ecma_get_number_from_completion_value (parse_res_value);\n+\n+    ECMA_FINALIZE (parse_res_value)\n+  }\n+  else if (args_len == 1)\n+  {\n+    ECMA_TRY_CATCH (prim_comp_value,\n+                    ecma_op_to_primitive (args_list_p[0], ECMA_PREFERRED_TYPE_NUMBER),\n+                    ret_value);\n+\n+    if (ecma_is_value_string (prim_comp_value))\n+    {\n+      ECMA_TRY_CATCH (parse_res_value,\n+                      ecma_builtin_date_parse (ecma_make_object_value (obj_p), prim_comp_value),\n+                      ret_value);\n+\n+      prim_value_num_p= ecma_alloc_number ();","path":"jerry-core/ecma/builtin-objects/ecma-builtin-date.cpp","position":77,"original_position":77,"commit_id":"c2e247292d0bef70db5c6a09a59683270d8487c6","original_commit_id":"c2e247292d0bef70db5c6a09a59683270d8487c6","user":{"login":"galpeter","id":12067856,"avatar_url":"https://avatars.githubusercontent.com/u/12067856?v=3","gravatar_id":"","url":"https://api.github.com/users/galpeter","html_url":"https://github.com/galpeter","followers_url":"https://api.github.com/users/galpeter/followers","following_url":"https://api.github.com/users/galpeter/following{/other_user}","gists_url":"https://api.github.com/users/galpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/galpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galpeter/subscriptions","organizations_url":"https://api.github.com/users/galpeter/orgs","repos_url":"https://api.github.com/users/galpeter/repos","events_url":"https://api.github.com/users/galpeter/events{/privacy}","received_events_url":"https://api.github.com/users/galpeter/received_events","type":"User","site_admin":false},"body":"Space before `=`","created_at":"2015-07-07T08:31:13Z","updated_at":"2015-07-07T08:31:13Z","html_url":"https://github.com/Samsung/jerryscript/pull/322#discussion_r34017852","pull_request_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/322","_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/34017852"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/322#discussion_r34017852"},"pull_request":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/322"}}},"pull_request":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/322","id":39345468,"html_url":"https://github.com/Samsung/jerryscript/pull/322","diff_url":"https://github.com/Samsung/jerryscript/pull/322.diff","patch_url":"https://github.com/Samsung/jerryscript/pull/322.patch","issue_url":"https://api.github.com/repos/Samsung/jerryscript/issues/322","number":322,"state":"open","locked":false,"title":"Implement Date constructor.","user":{"login":"LaszloLango","id":10030017,"avatar_url":"https://avatars.githubusercontent.com/u/10030017?v=3","gravatar_id":"","url":"https://api.github.com/users/LaszloLango","html_url":"https://github.com/LaszloLango","followers_url":"https://api.github.com/users/LaszloLango/followers","following_url":"https://api.github.com/users/LaszloLango/following{/other_user}","gists_url":"https://api.github.com/users/LaszloLango/gists{/gist_id}","starred_url":"https://api.github.com/users/LaszloLango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaszloLango/subscriptions","organizations_url":"https://api.github.com/users/LaszloLango/orgs","repos_url":"https://api.github.com/users/LaszloLango/repos","events_url":"https://api.github.com/users/LaszloLango/events{/privacy}","received_events_url":"https://api.github.com/users/LaszloLango/received_events","type":"User","site_admin":false},"body":"JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com","created_at":"2015-07-07T08:23:00Z","updated_at":"2015-07-07T08:31:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dabb48002ad3376c0b5282ad587930fa1d560983","assignee":{"login":"egavrin","id":782710,"avatar_url":"https://avatars.githubusercontent.com/u/782710?v=3","gravatar_id":"","url":"https://api.github.com/users/egavrin","html_url":"https://github.com/egavrin","followers_url":"https://api.github.com/users/egavrin/followers","following_url":"https://api.github.com/users/egavrin/following{/other_user}","gists_url":"https://api.github.com/users/egavrin/gists{/gist_id}","starred_url":"https://api.github.com/users/egavrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egavrin/subscriptions","organizations_url":"https://api.github.com/users/egavrin/orgs","repos_url":"https://api.github.com/users/egavrin/repos","events_url":"https://api.github.com/users/egavrin/events{/privacy}","received_events_url":"https://api.github.com/users/egavrin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Samsung/jerryscript/milestones/2","html_url":"https://github.com/Samsung/jerryscript/milestones/ECMA%20builtins","labels_url":"https://api.github.com/repos/Samsung/jerryscript/milestones/2/labels","id":1120294,"number":2,"title":"ECMA builtins","description":"","creator":{"login":"galpeter","id":12067856,"avatar_url":"https://avatars.githubusercontent.com/u/12067856?v=3","gravatar_id":"","url":"https://api.github.com/users/galpeter","html_url":"https://github.com/galpeter","followers_url":"https://api.github.com/users/galpeter/followers","following_url":"https://api.github.com/users/galpeter/following{/other_user}","gists_url":"https://api.github.com/users/galpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/galpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galpeter/subscriptions","organizations_url":"https://api.github.com/users/galpeter/orgs","repos_url":"https://api.github.com/users/galpeter/repos","events_url":"https://api.github.com/users/galpeter/events{/privacy}","received_events_url":"https://api.github.com/users/galpeter/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":61,"state":"open","created_at":"2015-05-20T08:01:13Z","updated_at":"2015-07-07T08:26:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/322/commits","review_comments_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/322/comments","review_comment_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/issues/322/comments","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/c2e247292d0bef70db5c6a09a59683270d8487c6","head":{"label":"LaszloLango:date_construct_dev","ref":"date_construct_dev","sha":"c2e247292d0bef70db5c6a09a59683270d8487c6","user":{"login":"LaszloLango","id":10030017,"avatar_url":"https://avatars.githubusercontent.com/u/10030017?v=3","gravatar_id":"","url":"https://api.github.com/users/LaszloLango","html_url":"https://github.com/LaszloLango","followers_url":"https://api.github.com/users/LaszloLango/followers","following_url":"https://api.github.com/users/LaszloLango/following{/other_user}","gists_url":"https://api.github.com/users/LaszloLango/gists{/gist_id}","starred_url":"https://api.github.com/users/LaszloLango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaszloLango/subscriptions","organizations_url":"https://api.github.com/users/LaszloLango/orgs","repos_url":"https://api.github.com/users/LaszloLango/repos","events_url":"https://api.github.com/users/LaszloLango/events{/privacy}","received_events_url":"https://api.github.com/users/LaszloLango/received_events","type":"User","site_admin":false},"repo":{"id":38432323,"name":"jerryscript","full_name":"LaszloLango/jerryscript","owner":{"login":"LaszloLango","id":10030017,"avatar_url":"https://avatars.githubusercontent.com/u/10030017?v=3","gravatar_id":"","url":"https://api.github.com/users/LaszloLango","html_url":"https://github.com/LaszloLango","followers_url":"https://api.github.com/users/LaszloLango/followers","following_url":"https://api.github.com/users/LaszloLango/following{/other_user}","gists_url":"https://api.github.com/users/LaszloLango/gists{/gist_id}","starred_url":"https://api.github.com/users/LaszloLango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaszloLango/subscriptions","organizations_url":"https://api.github.com/users/LaszloLango/orgs","repos_url":"https://api.github.com/users/LaszloLango/repos","events_url":"https://api.github.com/users/LaszloLango/events{/privacy}","received_events_url":"https://api.github.com/users/LaszloLango/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LaszloLango/jerryscript","description":"","fork":true,"url":"https://api.github.com/repos/LaszloLango/jerryscript","forks_url":"https://api.github.com/repos/LaszloLango/jerryscript/forks","keys_url":"https://api.github.com/repos/LaszloLango/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaszloLango/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaszloLango/jerryscript/teams","hooks_url":"https://api.github.com/repos/LaszloLango/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/LaszloLango/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/LaszloLango/jerryscript/events","assignees_url":"https://api.github.com/repos/LaszloLango/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/LaszloLango/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/LaszloLango/jerryscript/tags","blobs_url":"https://api.github.com/repos/LaszloLango/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaszloLango/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaszloLango/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaszloLango/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaszloLango/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/LaszloLango/jerryscript/languages","stargazers_url":"https://api.github.com/repos/LaszloLango/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/LaszloLango/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/LaszloLango/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/LaszloLango/jerryscript/subscription","commits_url":"https://api.github.com/repos/LaszloLango/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaszloLango/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaszloLango/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaszloLango/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/LaszloLango/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/LaszloLango/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaszloLango/jerryscript/merges","archive_url":"https://api.github.com/repos/LaszloLango/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaszloLango/jerryscript/downloads","issues_url":"https://api.github.com/repos/LaszloLango/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/LaszloLango/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/LaszloLango/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/LaszloLango/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaszloLango/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/LaszloLango/jerryscript/releases{/id}","created_at":"2015-07-02T12:47:42Z","updated_at":"2015-07-02T12:47:44Z","pushed_at":"2015-07-07T08:20:06Z","git_url":"git://github.com/LaszloLango/jerryscript.git","ssh_url":"git@github.com:LaszloLango/jerryscript.git","clone_url":"https://github.com/LaszloLango/jerryscript.git","svn_url":"https://github.com/LaszloLango/jerryscript","homepage":null,"size":4923,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"Samsung:master","ref":"master","sha":"cadc8f40d4ea7be95d72e91df946dd002aedbad6","user":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"repo":{"id":33339660,"name":"jerryscript","full_name":"Samsung/jerryscript","owner":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Samsung/jerryscript","description":"","fork":false,"url":"https://api.github.com/repos/Samsung/jerryscript","forks_url":"https://api.github.com/repos/Samsung/jerryscript/forks","keys_url":"https://api.github.com/repos/Samsung/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samsung/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samsung/jerryscript/teams","hooks_url":"https://api.github.com/repos/Samsung/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/Samsung/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/Samsung/jerryscript/events","assignees_url":"https://api.github.com/repos/Samsung/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/Samsung/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/Samsung/jerryscript/tags","blobs_url":"https://api.github.com/repos/Samsung/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samsung/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samsung/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samsung/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/Samsung/jerryscript/languages","stargazers_url":"https://api.github.com/repos/Samsung/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/Samsung/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/Samsung/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/Samsung/jerryscript/subscription","commits_url":"https://api.github.com/repos/Samsung/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samsung/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samsung/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samsung/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/Samsung/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samsung/jerryscript/merges","archive_url":"https://api.github.com/repos/Samsung/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samsung/jerryscript/downloads","issues_url":"https://api.github.com/repos/Samsung/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/Samsung/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/Samsung/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/Samsung/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samsung/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/Samsung/jerryscript/releases{/id}","created_at":"2015-04-03T01:10:31Z","updated_at":"2015-07-02T23:57:48Z","pushed_at":"2015-07-07T08:23:00Z","git_url":"git://github.com/Samsung/jerryscript.git","ssh_url":"git@github.com:Samsung/jerryscript.git","clone_url":"https://github.com/Samsung/jerryscript.git","svn_url":"https://github.com/Samsung/jerryscript","homepage":null,"size":10054,"stargazers_count":9,"watchers_count":9,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":77,"forks":11,"open_issues":77,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/322"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/322"},"issue":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/322"},"comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/322/comments"},"review_comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/322/comments"},"review_comment":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/322/commits"},"statuses":{"href":"https://api.github.com/repos/Samsung/jerryscript/statuses/c2e247292d0bef70db5c6a09a59683270d8487c6"}}}}