Created
February 1, 2019 02:56
-
-
Save wedwin53/2b6de3f4ab51f1e8cd57570eda1645b6 to your computer and use it in GitHub Desktop.
Obtain the date formated yyyyMMdd
This file contains 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
var f = new Date(); | |
var currentMonth = f.getMonth() +1; | |
if (currentMonth < 10) { currentMonth = '0' + currentMonth; } | |
var today = f.getFullYear().toString() + currentMonth + f.getDate().toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment