lib/date.js
function iterateOverDateParams(params, fn, startIndex, endIndex) {

  function run(name, unit, i) {
    var val = getDateParam(params, name);
    if (isDefined(val)) {
      fn(name, val, unit, i);
    }
  }

  iterateOverDateUnits(function (unit, i) {
    var result = run(unit.name, unit, i);
    if (result !== false && i === DAY_INDEX) {
      // Check for "weekday", which has a distinct meaning
      // in the context of setting a date, but has the same
      // meaning as "day" as a unit of time.
      result = run('weekday', unit, i);
    }
    return result;
  }, startIndex, endIndex);

}
function iterateOverDateParams(params, fn, startIndex, endIndex) {

  function run(name, unit, i) {
    var val = getDateParam(params, name);
    if (isDefined(val)) {
      fn(name, val, unit, i);
    }
  }

  iterateOverDateUnits(function (unit, i) {
    var result = run(unit.name, unit, i);
    if (result !== false && i === DAY_INDEX) {
      // Check for "weekday", which has a distinct meaning
      // in the context of setting a date, but has the same
      // meaning as "day" as a unit of time.
      result = run('weekday', unit, i);
    }
    return result;
  }, startIndex, endIndex);

}
function iterateOverDateParams ( params , fn , startIndex , endIndex ) { function run ( name , unit , i ) { var val = getDateParam ( params , name ) ; if ( isDefined ( val ) ) { fn ( name , val , unit , i ) ; } } iterateOverDateUnits ( function ( unit , i ) { var result = run ( unit . name , unit , i ) ; if ( result !== false && i === DAY_INDEX ) { // Check for "weekday", which has a distinct meaning // in the context of setting a date, but has the same // meaning as "day" as a unit of time. result = run ( 'weekday' , unit , i ) ; } return result ; } , startIndex , endIndex ) ; }
Years -> Milliseconds checking all date params including "weekday"
Years - > Milliseconds checking all date params including weekday