JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id="can" style="width:100%;height:100%;"></canvas>
JavaScript
var canvas = document.getElementById("can");
var ctx = canvas.getContext("2d");
var fun = function () {
ctx.canvas.width = ctx.canvas.width;
var today = new Date();
var target = new Date("10-28-2016");
var diff = new Date(target - today);
var str = diff.getMonth() + ":" + diff.getDate() + " " + diff.getHours() + ":" + diff.getMinutes() + ":" + diff.getSeconds() + ":" + diff.getMilliseconds();
ctx.font = "bold 32px Arial";
ctx.fillText(str, 10, 30);
ctx.fill();
};
setInterval(fun, 10);