{"action":"created","comment":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/34870564","id":34870564,"diff_hunk":"@@ -1207,7 +1148,66 @@ ecma_builtin_date_prototype_to_utc_string (ecma_value_t this_arg) /**< this argu\n static ecma_completion_value_t\n ecma_builtin_date_prototype_to_iso_string (ecma_value_t this_arg) /**< this argument */\n {\n-  ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);\n+  ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();\n+\n+  if (!ecma_is_value_object (this_arg)\n+      || ecma_object_get_class_name (ecma_get_object_from_value (this_arg)) != LIT_MAGIC_STRING_DATE_UL)\n+  {\n+    ret_value = ecma_raise_type_error (\"Incompatible type\");\n+  }\n+  else\n+  {\n+    ECMA_TRY_CATCH (obj_this,\n+                    ecma_op_to_object (this_arg),\n+                    ret_value);\n+\n+    ecma_object_t *obj_p = ecma_get_object_from_value (obj_this);\n+    ecma_property_t *prim_value_prop_p;\n+    prim_value_prop_p = ecma_get_internal_property (obj_p, ECMA_INTERNAL_PROPERTY_PRIMITIVE_NUMBER_VALUE);\n+    ecma_number_t *prim_value_num_p = ECMA_GET_NON_NULL_POINTER (ecma_number_t,\n+                                                                 prim_value_prop_p->u.internal_property.value);\n+\n+    if (ecma_number_is_nan (*prim_value_num_p))\n+    {\n+      ecma_string_t *magic_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INVALID_DATE_UL);\n+      ret_value = ecma_make_normal_completion_value (ecma_make_string_value (magic_str_p));\n+    }\n+    else\n+    {\n+      ecma_number_t milliseconds = ecma_date_ms_from_time (*prim_value_num_p);\n+      ecma_string_t *output_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);\n+      ecma_date_insert_num_with_sep (&output_str_p, milliseconds, LIT_MAGIC_STRING_UTC_TIME_ZONE_U, 3);","path":"jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.cpp","position":101,"original_position":101,"commit_id":"f1d10fdb3ed930748ad1bfe118e7586f1e3857ef","original_commit_id":"f1d10fdb3ed930748ad1bfe118e7586f1e3857ef","user":{"login":"rtakacs","id":1487864,"avatar_url":"https://avatars.githubusercontent.com/u/1487864?v=3","gravatar_id":"","url":"https://api.github.com/users/rtakacs","html_url":"https://github.com/rtakacs","followers_url":"https://api.github.com/users/rtakacs/followers","following_url":"https://api.github.com/users/rtakacs/following{/other_user}","gists_url":"https://api.github.com/users/rtakacs/gists{/gist_id}","starred_url":"https://api.github.com/users/rtakacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtakacs/subscriptions","organizations_url":"https://api.github.com/users/rtakacs/orgs","repos_url":"https://api.github.com/users/rtakacs/repos","events_url":"https://api.github.com/users/rtakacs/events{/privacy}","received_events_url":"https://api.github.com/users/rtakacs/received_events","type":"User","site_admin":false},"body":"You are right, I missed that the time zone is different from toString and toISOString. The helper is a good solution. The toUTCString could use it as well.","created_at":"2015-07-17T08:24:22Z","updated_at":"2015-07-17T08:24:22Z","html_url":"https://github.com/Samsung/jerryscript/pull/418#discussion_r34870564","pull_request_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/418","_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/34870564"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/418#discussion_r34870564"},"pull_request":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/418"}}},"pull_request":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/418","id":40118697,"html_url":"https://github.com/Samsung/jerryscript/pull/418","diff_url":"https://github.com/Samsung/jerryscript/pull/418.diff","patch_url":"https://github.com/Samsung/jerryscript/pull/418.patch","issue_url":"https://api.github.com/repos/Samsung/jerryscript/issues/418","number":418,"state":"open","locked":false,"title":"Implement Date.prototype.toISOString()","user":{"login":"rtakacs","id":1487864,"avatar_url":"https://avatars.githubusercontent.com/u/1487864?v=3","gravatar_id":"","url":"https://api.github.com/users/rtakacs","html_url":"https://github.com/rtakacs","followers_url":"https://api.github.com/users/rtakacs/followers","following_url":"https://api.github.com/users/rtakacs/following{/other_user}","gists_url":"https://api.github.com/users/rtakacs/gists{/gist_id}","starred_url":"https://api.github.com/users/rtakacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtakacs/subscriptions","organizations_url":"https://api.github.com/users/rtakacs/orgs","repos_url":"https://api.github.com/users/rtakacs/repos","events_url":"https://api.github.com/users/rtakacs/events{/privacy}","received_events_url":"https://api.github.com/users/rtakacs/received_events","type":"User","site_admin":false},"body":"Moved toString() logic into the toISOString() method extended with a Z postfix as the standard said.\r\nSince the toString() is \"implementation-dependent\" the toString() calls the toISOString() method.","created_at":"2015-07-16T11:19:19Z","updated_at":"2015-07-17T08:24:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81c45312dc9cbc68be9a52e81ec5218c3ae0ba3a","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":35,"closed_issues":106,"state":"open","created_at":"2015-05-20T08:01:13Z","updated_at":"2015-07-17T06:03:43Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/418/commits","review_comments_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/418/comments","review_comment_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/issues/418/comments","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/f1d10fdb3ed930748ad1bfe118e7586f1e3857ef","head":{"label":"rtakacs:date_toisostring","ref":"date_toisostring","sha":"f1d10fdb3ed930748ad1bfe118e7586f1e3857ef","user":{"login":"rtakacs","id":1487864,"avatar_url":"https://avatars.githubusercontent.com/u/1487864?v=3","gravatar_id":"","url":"https://api.github.com/users/rtakacs","html_url":"https://github.com/rtakacs","followers_url":"https://api.github.com/users/rtakacs/followers","following_url":"https://api.github.com/users/rtakacs/following{/other_user}","gists_url":"https://api.github.com/users/rtakacs/gists{/gist_id}","starred_url":"https://api.github.com/users/rtakacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtakacs/subscriptions","organizations_url":"https://api.github.com/users/rtakacs/orgs","repos_url":"https://api.github.com/users/rtakacs/repos","events_url":"https://api.github.com/users/rtakacs/events{/privacy}","received_events_url":"https://api.github.com/users/rtakacs/received_events","type":"User","site_admin":false},"repo":{"id":39068861,"name":"jerryscript","full_name":"rtakacs/jerryscript","owner":{"login":"rtakacs","id":1487864,"avatar_url":"https://avatars.githubusercontent.com/u/1487864?v=3","gravatar_id":"","url":"https://api.github.com/users/rtakacs","html_url":"https://github.com/rtakacs","followers_url":"https://api.github.com/users/rtakacs/followers","following_url":"https://api.github.com/users/rtakacs/following{/other_user}","gists_url":"https://api.github.com/users/rtakacs/gists{/gist_id}","starred_url":"https://api.github.com/users/rtakacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtakacs/subscriptions","organizations_url":"https://api.github.com/users/rtakacs/orgs","repos_url":"https://api.github.com/users/rtakacs/repos","events_url":"https://api.github.com/users/rtakacs/events{/privacy}","received_events_url":"https://api.github.com/users/rtakacs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rtakacs/jerryscript","description":"","fork":true,"url":"https://api.github.com/repos/rtakacs/jerryscript","forks_url":"https://api.github.com/repos/rtakacs/jerryscript/forks","keys_url":"https://api.github.com/repos/rtakacs/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtakacs/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtakacs/jerryscript/teams","hooks_url":"https://api.github.com/repos/rtakacs/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/rtakacs/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/rtakacs/jerryscript/events","assignees_url":"https://api.github.com/repos/rtakacs/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/rtakacs/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/rtakacs/jerryscript/tags","blobs_url":"https://api.github.com/repos/rtakacs/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtakacs/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtakacs/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtakacs/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtakacs/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/rtakacs/jerryscript/languages","stargazers_url":"https://api.github.com/repos/rtakacs/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/rtakacs/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/rtakacs/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/rtakacs/jerryscript/subscription","commits_url":"https://api.github.com/repos/rtakacs/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtakacs/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtakacs/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtakacs/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtakacs/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/rtakacs/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtakacs/jerryscript/merges","archive_url":"https://api.github.com/repos/rtakacs/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtakacs/jerryscript/downloads","issues_url":"https://api.github.com/repos/rtakacs/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/rtakacs/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/rtakacs/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/rtakacs/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtakacs/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/rtakacs/jerryscript/releases{/id}","created_at":"2015-07-14T10:34:58Z","updated_at":"2015-07-14T10:35:01Z","pushed_at":"2015-07-17T07:44:16Z","git_url":"git://github.com/rtakacs/jerryscript.git","ssh_url":"git@github.com:rtakacs/jerryscript.git","clone_url":"https://github.com/rtakacs/jerryscript.git","svn_url":"https://github.com/rtakacs/jerryscript","homepage":null,"size":5062,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"351df6184c62b74f1246e9400fb5180d94882baf","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-16T22:09:15Z","pushed_at":"2015-07-17T08:24:04Z","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":11363,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":92,"forks":14,"open_issues":92,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/418"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/418"},"issue":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/418"},"comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/418/comments"},"review_comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/418/comments"},"review_comment":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/418/commits"},"statuses":{"href":"https://api.github.com/repos/Samsung/jerryscript/statuses/f1d10fdb3ed930748ad1bfe118e7586f1e3857ef"}}}}