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
本文作者:___mouM
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。
版权说明:本文版权归作者和博客园共有,欢迎转载。但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利.

浙公网安备 33010602011771号