<script>
//Add your Convertable code. Don't forget to add \ before the closing > as in the exmple below.
var convStr = '<script src="//a0a1179f80df414f91512d8919c3e847.js.ubembed.com" async></script\>';
//Add the start and end dates using the format mm/dd/yyyy.
var startDate = '05/05/2017';
var endDate = '05/09/2017';
/*DON'T CHANGE ANYTHING BELOW THIS LINE!*/
var curr_date = getDate();
if (curr_date >= startDate && curr_date <= endDate) {
$("body").prepend(convStr);
}
function getDate() {
var d = new Date();
var day = d.getDate();
var month = d.getMonth()+1;
var output = ('0'+month).slice(-2)+'/'+('0'+ day).slice(-2)+'/'+d.getFullYear();
return output;
}
</script>
Last active
August 14, 2017 02:21
-
-
Save victorzen/caa959f6a4aa1595beaf67dfd35d750a to your computer and use it in GitHub Desktop.
Trigger a convertable between two given dates
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment