<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
//Polulate it via JavaScript
var onlythis = document.getElementById('onlythislink');
onlythis.href = window.location.href;
<!-- language: lang-html -->
<!-- Keep link blank initially -->
<a id="onlythislink" href="#">Site</a>
<!-- end snippet -->
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
var utc = new Date().toJSON().slice(0,10).replace(/-/g,'/');
document.write(utc);
<!-- end snippet -->
Use the `replace` option if you're going to reuse the `utc` variable, such as `new Date(utc)`, as Firefox and Safari don't recognize a date with dashes.