Javascript examples for Date:toLocaleString
Reposition Date String to locale
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from ww w. j a va2 s . co m*/ String.prototype.toLocaleString = function (locale) { if (locale == "de-de") return this.replace(/(\d+).(\d+).(\d+)/, '$2.$1.$3'); } console.log('01.02.2013'.toLocaleString("de-de")); } </script> </head> <body> </body> </html>