node_modules/pomelo-admin/node_modules/pomelo-scheduler/lib/cronTrigger.js
/**
 * Decode time range
 * @param map The decode map
 * @param timeStr The range string, like 2-5
 */
Decode time range
@param map The decode map
@param timeStr The range string, like 2-5
Decode time range @param map The decode map @param timeStr The range string like 2 - 5
function decodeRangeTime(map, timeStr){
  var times = timeStr.split('-');
  times[0] = Number(times[0]);
  times[1] = Number(times[1]);
  if(times[0] > times[1]){
    console.log("Error time range");
    return null;
  }
  for(var i = times[0]; i <= times[1]; i++){
    map[i] = i;
  }
}
function decodeRangeTime ( map , timeStr ) { var times = timeStr . split ( '-' ) ; times [ 0 ] = Number ( times [ 0 ] ) ; times [ 1 ] = Number ( times [ 1 ] ) ; if ( times [ 0 ] > times [ 1 ] ) { console . log ( "Error time range" ) ; return null ; } for ( var i = times [ 0 ] ; i <= times [ 1 ] ; i ++ ) { map [ i ] = i ; } }
Decode time range
 @param map The decode map
 @param timeStr The range string, like 2-5
Decode time range @param map The decode map @param timeStr The range string like 2 - 5