I have inputs with values that have date format like dd.mm.yy
.
I get them:
var date1 = $('.main-order-form input[name=start_date]').val();
var date2 = $('.main-order-form input[name=end_date]').val();
And want to make them like yyyy, MM, dd
(it's need to compare them)
I try this, but nothing changed.
console.log(date1.toString("yyyy, mm, dd"));
1) How to change date format?
2) Is it posible to count weekends days between two dates?