increment date by one month

前端 未结 18 2442
广开言路
广开言路 2020-11-27 04:14

Let\'s say I have a date in the following format: 2010-12-11 (year-mon-day)

With PHP, I want to increment the date by one month, and I want the year to be automatica

18条回答
  •  独厮守ぢ
    2020-11-27 04:29

    put a date in input box then click the button get day from date in jquery

    $(document).ready( function() {
        $("button").click(function(){   
        var day = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
        var a = new Date();
        $(".result").text(day[a.getDay()]);
    
        });  
                 });
    

提交回复
热议问题