Created
March 29, 2022 16:17
-
-
Save lucatsf/208da975ceaddf825c91145154380db2 to your computer and use it in GitHub Desktop.
Date Format PT-BR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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