Name

toLocaleString() — NN 2 IE J1 ECMA 1

Synopsis

Returns a string version of the local time zone value of a Date object instance in a format that may be localized for a particular country or an operating system’s convention. This method does not alter the original Date object.

Returned Value

String in a variety of possible formats. Examples of U.S. versions of browsers include:

Platform

String Value

Navigator 4/Win32

03/31/98 11:22:44

Navigator 4/MacPPC

Mar 31 11:22:44 1998

Internet Explorer 4/Win32

03/31/98 11:22:44

Internet Explorer 4/MacPPC

Tuesday, 31 March, 1998 11:22:44 AM

Parameters

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.