1var dateObj = new Date();
2var month = dateObj.getUTCMonth() + 1; //months from 1-12
3var day = dateObj.getUTCDate();
4var year = dateObj.getUTCFullYear();
5
6newdate = year + "/" + month + "/" + day;
7
1let dateObj = new Date();
2
3let myDate = (dateObj.getUTCFullYear()) + "/" + (dateObj.getMonth() + 1)+ "/" + (dateObj.getUTCDate());
1const d = new Date();
2
3d.getMonth() + 1; // Month [mm] (1 - 12)
4d.getDate(); // Day [dd] (1 - 31)
5d.getFullYear(); // Year [yyyy]