[INTL] Implement Date.prototype.toLocaleDateString in ECMA-402
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2016 01:07:34 +0000 (01:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2016 01:07:34 +0000 (01:07 +0000)
commit63d7ab760aabe71ad08b23c22a9077f0b23b8e04
treec025465e0ecd4f0ca8728c60e15c45a7ea1130a1
parent603232d10a37ca68a95f05f402227f210bdd7143
[INTL] Implement Date.prototype.toLocaleDateString in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147612

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2016-01-19
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Implement toLocaleDateString in builtin JavaScript. Remove comments with
spec steps, and instead link to the new HTML version of the spec.

Avoids creating an extra empty object in the prototype chain of the options
object in ToDateTimeOptions. The version used in toLocaleString was updated
to match as well.

* builtins/DatePrototype.js:
(toLocaleString.toDateTimeOptionsAnyAll):
(toLocaleString):
(toLocaleDateString.toDateTimeOptionsDateDate):
(toLocaleDateString):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::finishCreation):

LayoutTests:

Added tests for toLocaleDateString.

* js/date-toLocaleString-expected.txt:
* js/script-tests/date-toLocaleString.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/date-toLocaleString-expected.txt
LayoutTests/js/script-tests/date-toLocaleString.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/DatePrototype.js
Source/JavaScriptCore/runtime/DatePrototype.cpp