let time = Date.parse('2018-00-01T00:00:00'); let date = new Date(); let now = date.getTime(); let result = now - time; result = result / (); alert(result);