Menggunakan day.js
function startTime() {
var date = dayjs().format('dddd MMMM D, YYYY')
var time = dayjs().format('h:m:s')
document.getElementById('date').innerHTML = date;
document.getElementById('time').innerHTML = time;
setTimeout(startTime, 1000);
}Thanks for reads, hope you enjoyed it, sharing this article on your favorite social media network would be highly appreciated 💖! Sawernya juga boleh