JavaScript Intl.DateTimeFormat Brasil

new Intl.DateTimeFormat('pt-BR', options)
DevPedrada