Date.toLocaleDateString() (Method)

The value of the Date object is presented just as a date taking the present locale into consideration.


ECMAScript edition - 3
JavaScript - 1.5
JScript - 5.5
Internet Explorer - 5.5
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myDate.toLocaleDateString()

The time value is rounded off, and only the date value is presented by this method. Any locale specific character encoding is performed as necessary. If the implementation is particularly well endowed with internationalization code, this is an opportunity to reorganize the order of the day, month and year components and also to substitute leading zeros if necessary. The month names may also be spelled differently.


ECMA 262 edition 3 - section -