templates/validation-function/time-module.js
function compareDates(a, b) {
    var aTimestamp = convertToTimestamp(a);
    var bTimestamp = convertToTimestamp(b);

    if (isNaN(aTimestamp) || isNaN(bTimestamp)) {
      return NaN;
    } else {
      return aTimestamp - bTimestamp;
    }
  }
function compareDates(a, b) {
    var aTimestamp = convertToTimestamp(a);
    var bTimestamp = convertToTimestamp(b);

    if (isNaN(aTimestamp) || isNaN(bTimestamp)) {
      return NaN;
    } else {
      return aTimestamp - bTimestamp;
    }
  }
function compareDates ( a , b ) { var aTimestamp = convertToTimestamp ( a ) ; var bTimestamp = convertToTimestamp ( b ) ; if ( isNaN ( aTimestamp ) || isNaN ( bTimestamp ) ) { return NaN ; } else { return aTimestamp - bTimestamp ; } }
Compares the given date representations. Returns a negative number if a is less than b, a positive number if a is greater than b, or zero if a and b are equal.
Compares the given date representations . Returns a negative number if a is less than b a positive number if a is greater than b or zero if a and b are equal .