I want to get the date in the format: 15-10-19
But for some reason, it writes: 15-10-119. I have no idea why it writes 119 as year. (Notice, I don't want the full year.
Here is my code
var today = new Date();
var dd = String(today.getDate());
var mm = String(today.getMonth() + 1);
var yy = today.getYear();
var dateToday = dd+"-"+mm+"-"+yy;
console.log(dateToday);