Use DateTime class instead of Date, use Timer object instead of window.setInterval