Skip to content

Instantly share code, notes, and snippets.

@wedwin53
Created February 1, 2019 02:56
Show Gist options
  • Save wedwin53/2b6de3f4ab51f1e8cd57570eda1645b6 to your computer and use it in GitHub Desktop.
Save wedwin53/2b6de3f4ab51f1e8cd57570eda1645b6 to your computer and use it in GitHub Desktop.
Obtain the date formated yyyyMMdd
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