<script>
var valueOfDateInput = "2013-06-11";
function a(str) {
return new Date(str.split('-').join('/'));
}
function b(str) {
var parts = "2013-06-11".split('-');
return new Date(parts[0], parts[1]-1, parts[2])
}
</script>
Read full article from value of date input to date object · jsPerf
No comments:
Post a Comment