Affecting toLocaleString() may return different values than before

Published: | Categories: JavaScript


The Date.toLocaleString, Date.toLocaleDateString, Date.toLocaleTimeString, Number.toLocaleString and String.localeCompare methods have been reimplemented to support the ECMAScript Internationalization API. Those methods are implementation-dependent if the arguments are omitted, thus results you’ll get might be different than the value returned by the previous versions of Firefox.

Formerly, Date.toLocaleString, Date.toLocaleDateString and Date.toLocaleTimeString returned the system date and time, but now the format is different depending on the browser locale. Number.toLocaleString will return localized digits defined by the OS, while the previous versions of Firefox returned English digits. String.localeCompare may return 1 or -1 where previously 2 or -2 was returned.