zoukankan      html  css  js  c++  java
  • js 開始时间,当前时间,结束时间的比較



    //開始时间不能小于当前时间
    function startTimeIsBigThanTotay(startTime){
    	  var startdate = new Date((startTime).replace(/-/g,"/"));  
          var date = new Date();  
          if(startdate < date) 
          {
              return false;
          }
          else
          {
             return true;
          }
    }
    
    //结束时间不能小于当前时间 
    function endThanTotay(endTime){
    	  var enddate = new Date((endTime).replace(/-/g,"/"));  
    	  var nowdate = new Date();     
          if(enddate < nowdate)    
          {
              return false;
          }
          else
          {
             return true;
          }
    }
    
    
    //结束时间不能小于開始时间 
    function endThanStart(startTime,endTime){
    	  var startdate = new Date((startTime).replace(/-/g,"/"));  
    	  var enddate = new Date((endTime).replace(/-/g,"/"));    
          if(enddate < startdate)  
          {
              return false;
          }
          else
          {
             return true;
          }
    }
    


  • 相关阅读:
    c++ ::和:
    c++ extern
    c++ cpp和hpp
    c++ include
    caffe调试
    caffe blob理解
    poj3126
    FFmpeg滤镜使用指南
    Android之Activity之间传递对象
    Server Tomcat v8.0 Server at localhost failed to start.
  • 原文地址:https://www.cnblogs.com/wzjhoutai/p/7301252.html
Copyright © 2011-2022 走看看