Skip to content

Instantly share code, notes, and snippets.

@peteee
Last active March 4, 2020 17:54
Show Gist options
  • Save peteee/f46a28ca1beae1ca0b260fbd07121bd1 to your computer and use it in GitHub Desktop.
Save peteee/f46a28ca1beae1ca0b260fbd07121bd1 to your computer and use it in GitHub Desktop.
dateFlag
/**
* Create unique url request flags to force reload...
*/
var d = new Date();
var dateFlag = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + "-" + d.getHours() + "-" + d.getMinutes() + "-" + d.getSeconds();
console.log(dateFlag); // logs: 2020-3-4-12-45-31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment