zoukankan      html  css  js  c++  java
  • js指定日期时间加一天 ,判断指定时间是否为周末

    function dateAdd(startDate) {
    
            startDate = new Date(startDate);
    
            startDate = +startDate + 1000*60*60*24;
    
            startDate = new Date(startDate);
    
            var nextStartDate = startDate.getFullYear()+"-"+(startDate.getMonth()+1)+"-"+startDate.getDate();
    
            return nextStartDate;
    
        }



    判断指定时间是否为周末

    function isWeekEnd(date){
    
      if( "天一二三四五六".charAt(new   Date(date).getDay())=="天" ) return true;
    
      if( "天一二三四五六".charAt(new   Date(date).getDay())=="六"  )  return true;
    
    }
    

    java获取当前年份

        public static String getCurrentYear(){       
       SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
      Date date = new Date();
      return sdf.format(date);}

    转载https://blog.csdn.net/MyNameIsXiaoLai/article/details/86654252

  • 相关阅读:
    博弈论--sg函数
    博弈论--nim博弈
    dp--bitset优化
    树--欧拉序
    树--dfs序
    树--dsu on tree
    树--树的重心
    单调队列
    单调栈
    dp--背包
  • 原文地址:https://www.cnblogs.com/aknife/p/11783142.html
Copyright © 2011-2022 走看看