Why print error, date -1 day my date is 2020-03-16, but print 2020-03-15?
This my code:
let dt = new Date('2020-03-16'); let dt_new = new Intl.DateTimeFormat('pt-BR').format(dt); console.log(dt_new); Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalWhy print error, date -1 day my date is 2020-03-16, but print 2020-03-15?
This my code:
let dt = new Date('2020-03-16'); let dt_new = new Intl.DateTimeFormat('pt-BR').format(dt); console.log(dt_new);
16/03/2020printed out.