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