JSFiddle - React, Tailwind, and code Playground
by Nibin George
HTML
<button onclick="timeLine(-12)">Click here</button>
<script>
function timeLine(hours){
var d = new Date();
d.setHours(d.getHours() - hours);
alert(d);
}
</script>
by Nibin George
<button onclick="timeLine(-12)">Click here</button>
<script>
function timeLine(hours){
var d = new Date();
d.setHours(d.getHours() - hours);
alert(d);
}
</script>