static/phpc.js
// return 0 on equal 1 on prefix1 > prefix, -1 on prefix1 < prefix2
return 0 on equal 1 on prefix1 > prefix, -1 on prefix1 < prefix2
return 0 on equal 1 on prefix1 > prefix - 1 on prefix1 < prefix2
function compareDates(prefix1, prefix2) {
  var year1 = parseInt($("#" + prefix1 + "-year").val());
  var year2 = parseInt($("#" + prefix2 + "-year").val());
  if(year1 > year2)
    return 1;
  if(year1 < year2)
    return -1;
  var month1 = parseInt($("#" + prefix1 + "-month").val());
  var month2 = parseInt($("#" + prefix2 + "-month").val());
  if(month1 > month2)
    return 1;
  if(month1 < month2)
    return -1;
  var day1 = parseInt($("#" + prefix1 + "-day").val());
  var day2 = parseInt($("#" + prefix2 + "-day").val());
  if(day1 > day2)
    return 1;
  if(day1 < day2)
    return -1;
  return 0;
}
function compareDates ( prefix1 , prefix2 ) { var year1 = parseInt ( $ ( "#" + prefix1 + "-year" ) . val ( ) ) ; var year2 = parseInt ( $ ( "#" + prefix2 + "-year" ) . val ( ) ) ; if ( year1 > year2 ) return 1 ; if ( year1 < year2 ) return - 1 ; var month1 = parseInt ( $ ( "#" + prefix1 + "-month" ) . val ( ) ) ; var month2 = parseInt ( $ ( "#" + prefix2 + "-month" ) . val ( ) ) ; if ( month1 > month2 ) return 1 ; if ( month1 < month2 ) return - 1 ; var day1 = parseInt ( $ ( "#" + prefix1 + "-day" ) . val ( ) ) ; var day2 = parseInt ( $ ( "#" + prefix2 + "-day" ) . val ( ) ) ; if ( day1 > day2 ) return 1 ; if ( day1 < day2 ) return - 1 ; return 0 ; }
return 0 on equal 1 on prefix1 > prefix, -1 on prefix1 < prefix2
return 0 on equal 1 on prefix1 > prefix - 1 on prefix1 < prefix2