//获取当前时间
    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = year + seperator1 + month + seperator1 + strDate;
        return currentdate;
    };
//输出格式 2019-01-25

 

相关文章:

  • 2022-03-01
  • 2022-01-19
  • 2021-06-06
  • 2021-12-19
  • 2022-12-23
  • 2021-07-16
  • 2021-11-28
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-11-28
  • 2021-12-02
  • 2021-11-28
  • 2022-01-11
  • 2021-11-29
相关资源
相似解决方案