I have a problem with the date () function of javascript what I want is to convert from a string to a date but convert the date minus 1 day.
function myFunction() {
var d = new Date('2018-02-28');
var n = d.toString();
document.getElementById("demo").innerHTML = n;
}
what it shows is:
Tue Feb 27 2018 20:00:00 GMT-0400 (Hora estándar oeste, Sudamérica)
I hope you can help me I need that format, thanks