`

js判断当前日期是否为周末

    博客分类:
  • js
 
阅读更多

function isWeekEnd(date){

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

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

}

 

isweekEnd("2014-04-13")

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics