Expand Minimize
This topic has not yet been rated - Rate this topic

toLocaleDateString Method (Date) (JavaScript)

JavaScript - Internet Explorer 10

Returns a date as a string value appropriate to the host environment's current locale.

objDate.toLocaleDateString( )

The required objDate reference is a Date object.

The toLocaleDateString method returns a string value that contains a date, in the current time zone, in an easily read format. The date is in the default format of the host environment's current locale. The return value of this method cannot be relied upon in scripting, as it will vary from computer to computer. The toLocaleDateString method should only be used to format display – never as part of a computation.

Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Also supported in Windows Store apps. See Version Information.

Applies To: Date Object (JavaScript)

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.