2.1.44 [ECMA-262/5] Section 22.214.171.124, Date.prototype.toLocaleDateString ()
The specification states:
This function returns a String value. The contents of the String are implementation-dependent, but are intended to represent the "date" portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment’s current locale.
IE9 Mode, IE10 Mode, and IE11 Mode (All Versions)
The returned String value is determined from the following steps:
Using the system locale settings, get the local time value that corresponds to the date value. Apply any appropriate civil time adjustments.
If the year of Result(1) is less than or equal to 1600 or is greater than or equal to 10000, return the result of calling the standard built-in Date.prototype.toString method with Result(1) as its this object.
Use the GetDateFormat Microsoft Windows system function (http://msdn.microsoft.com/en-us/library/dd318086(VS.85).aspx) to format the date and time that correspond to Result(1). Pass the default value of
DATE_LONGDATEfor format flags. However, if the current locale’s language is Arabic or Hebrew, pass the value
DATE_LONGDATE | Date_RTLREADINGfor format flags.
If the call in step 3 fails and the current locale language is Hebrew, throw a RangeError exception. Go to step 6.
If the call in step 3 fails, return the result of calling the standard built-in Date.prototype.toString method with Result(1) as its this object.
Return the string value that is Result(3).