/ Published in: JavaScript

Will convert all of the mysql dates on the page to be localized.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// javascript:document.body.innerHTML%20=%20document.body.innerHTML.replace(/(\d{4})-(\d{2})-(\d{2})/ig,function(match,year,month,day){return%20(new%20Date(year,month,day).toLocaleString())%20}); document.body.innerHTML = document.body.innerHTML.replace(/(\d{4})-(\d{2})-(\d{2})/ig,function(match,year,month,day){return (new Date(year,month,day).toLocaleString()) });
Comments
