zoukankan      html  css  js  c++  java
  • 日期中前一天和后一天

    function Previousday() {
    
        var curDate = new Date(CreateDate_Temp);
        var preDate = new Date(curDate.getTime() - 24 * 60 * 60 * 1000);
    
        var strDate = preDate.getFullYear() + "-";
        strDate += preDate.getMonth() + 1 + "-";
        strDate += preDate.getDate() + "-";
        strDate += preDate.getHours() + ":";
        strDate += preDate.getMinutes() + ":";
        strDate += preDate.getSeconds();
        $("#CreateDate").datebox("setValue", strDate);
        CreateDate_Temp = $('#CreateDate').datebox('getValue');
    }
    function NextDay() {
    
        // var nextDate = new Date(curDate.getTime() + 24*60*60*1000);
        var curDate = new Date(CreateDate_Temp);
        var nextDate = new Date(curDate.getTime() + 24 * 60 * 60 * 1000);
    
        var strDate = nextDate.getFullYear() + "-";
        strDate += nextDate.getMonth() + 1 + "-";
        strDate += nextDate.getDate() + "-";
        strDate += nextDate.getHours() + ":";
        strDate += nextDate.getMinutes() + ":";
        strDate += nextDate.getSeconds();
        $("#CreateDate").datebox("setValue", strDate);
        CreateDate_Temp = $('#CreateDate').datebox('getValue');
    }
    

      

  • 相关阅读:
    图论初步
    分块和块状链表
    线段树入门
    ST表与树状数组
    [luogu P1312]Mayan游戏
    [luoguP4139]上帝与集合的正确用法


    电解质
    无机盐
  • 原文地址:https://www.cnblogs.com/suhaihong/p/8533741.html
Copyright © 2011-2022 走看看