When I do new Date() in Angular2
(typescript) I GET -> DATEE Wed Jul 18 2018 09:13:40 GMT+0200
The problem is that I have sent Date to Java but Java doesn't let this format.
Java only let ,dd/mm/aaaa or aaaa/mm/dd but he doesn't let Wed Jul 18 2018 09:13:40 GMT+0200.
I try in Angular create a new format but always get String, but I need format Date because my class In Java get Date.
let myDate: Date, myDay, myMonth, myYear;
myDate = new Date();
myDay = myDate.setUTCFullYear;
console.log(myDay);
myDay = myDate.toISOString;
console.log(myDay);
console.log(typeof(myDay));
console.log(new Date(myDay));
I can not install libraries that angular does not bring by default for example: "moment". Ty