Created
September 5, 2019 13:40
-
-
Save MoritzBuetzer/0e596e53a6e84a9f3e45c3ce01ec0eec to your computer and use it in GitHub Desktop.
Month and Date of JavaScript in 2 digit format
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
// day | |
("0" + dateObj.getDate()).slice(-2) | |
// month | |
("0" + (dateObj.getMonth() + 1)).slice(-2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment