JSFiddle - React, Tailwind, and code Playground
by jeffgw
HTML
<p id="target"></p>
JavaScript
function thisFriday() {
date = new Date();
date.setDate(date.getDate() + (5 + 7 - date.getDay()) % 7);
return date.toISOString().slice(0,10).replace(/-/g,"");
}
$('#target').text(thisFriday())