Given a start and end date, create an array of the dates between the two

后端 未结 7 2267
难免孤独
难免孤独 2021-01-04 12:39

Right now, I have this on my page:



        
相关标签:
7条回答
  • 2021-01-04 13:33

    You can also use an interval to do what you want.

    var tstamp = 0;
    
    
    function timer() {
    
        console.log(tstamp);
        tstamp = new Date().getTime()
    }
    
    var i = setInterval(timer, 1000);
    
    //when no more needed
    clearInterval(i)
    
    0 讨论(0)
提交回复
热议问题