This string:
const date = "31/12/2020";
will give an "Invalid Date" if converted to date:
const asDate = new Date(date);
console.log(asDate);
The date above is an american-style date represented as string. Is there any chance javascript can understand dates written in different styles? So basically these:
const date2 = "31/12/2020";
const date = "2020-12-31";
would both give the same date?