I'm trying to convert data using JS ES6 Intl.DateTimeFormat("pt-BR")
, but everything i get is the previous day. Code i'm using:
var a = new Intl.DateTimeFormat("en-US");
var b = new Intl.DateTimeFormat("pt-BR");
console.log(a.format(new Date("2015-01-02"))); // "1/1/2015"
console.log(b.format(new Date("2015-01-02"))); // "01/01/2015"
Thank you in advance.