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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-09-30
猜你喜欢
  • 2021-05-23
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2021-09-04
相关资源
相似解决方案