Created
September 6, 2019 12:44
-
-
Save codebubb/c3e992689b7dac51a575a55e5554a447 to your computer and use it in GitHub Desktop.
Get today's date in JavaScript
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 today = new Date(); | |
| const dd = String(today.getDate()).padStart(2, '0'); | |
| const mm = String(today.getMonth() + 1).padStart(2, '0'); | |
| const yyyy = today.getFullYear(); | |
| const todayDate = `${dd}/${mm}/${yyyy}`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment