SyntaxFix
Write A Post
Hire A Developer
Questions
var st = "26.04.2013"; var pattern = /(\d{2})\.(\d{2})\.(\d{4})/; var dt = new Date(st.replace(pattern,'$3-$2-$1'));
And the output will be:
dt => Date {Fri Apr 26 2013}