• [isDuringDate 比较当前时间是否在指定时间段内]
  • @author dongsir
  • @DateTime 2019-08-21
  • @version 1.0
  • @param date [beginDateStr] [开始时间]
  • @param date [endDateStr] [结束时间]
  • @return Boolean
    */
    var date = {
    isDuringDate: function (beginDateStr, endDateStr) {
    var curDate = new Date(),
    beginDate = new Date(beginDateStr),
    endDate = new Date(endDateStr);
    if (curDate >= beginDate && curDate <= endDate) {

      return true;

    }

      return false;

    }
    }

标签: none

添加新评论