Skip to content

Instantly share code, notes, and snippets.

@lucatsf
Created March 29, 2022 16:17
Show Gist options
  • Save lucatsf/208da975ceaddf825c91145154380db2 to your computer and use it in GitHub Desktop.
Save lucatsf/208da975ceaddf825c91145154380db2 to your computer and use it in GitHub Desktop.
Date Format PT-BR
const currentDate = new Date()
const formatDate = currentDate.toLocaleDateString(
'pt-BR',
{
day: '2-digit',
month: '2-digit',
year: 'numeric
}
)
console.log(formatDate)
//OUT
//> 30/03/2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment