JSFiddle - React, Tailwind, and code Playground
by vi161
HTML
<span class="js-time-until"></span>
CSS
p {
color: black;
}
JavaScript
function timeUntil() {
var newTime = Date.now() + 1800000;
var nowUntil = new Date(newTime);
var formatted = nowUntil.getHours() + ":" + (nowUntil.getMinutes());
console.log(formatted);
jQuery('.js-time-until').html(formatted);
return formatted;
};
timeUntil();