/** * <p>Compares a calendar's quarter value to another, indicating whether it is * equal, less then or more than the specified quarter.</p> * * @param value The Calendar value. * @param compare The <code>Calendar</code> to check the value against. * @param monthOfFirstQuarter The month that the first quarter starts. * @return Zero if the first quarter is equal to the second, -1 * if it is less than the second or +1 if it is greater than the second. */ protected int compareQuarters(Calendar value, Calendar compare, int monthOfFirstQuarter) { int valueQuarter = calculateQuarter(value, monthOfFirstQuarter); int compareQuarter = calculateQuarter(compare, monthOfFirstQuarter); if (valueQuarter < compareQuarter) { return -1; } else if (valueQuarter > compareQuarter) { return 1; } else { return 0; } }
/** * <p>Compares a calendar's quarter value to another, indicating whether it is * equal, less then or more than the specified quarter.</p> * * @param value The Calendar value. * @param compare The <code>Calendar</code> to check the value against. * @param monthOfFirstQuarter The month that the first quarter starts. * @return Zero if the first quarter is equal to the second, -1 * if it is less than the second or +1 if it is greater than the second. */ protected int compareQuarters(Calendar value, Calendar compare, int monthOfFirstQuarter) { int valueQuarter = calculateQuarter(value, monthOfFirstQuarter); int compareQuarter = calculateQuarter(compare, monthOfFirstQuarter); if (valueQuarter < compareQuarter) { return -1; } else if (valueQuarter > compareQuarter) { return 1; } else { return 0; } }
/** * <p>Compares a calendar's quarter value to another, indicating whether it is * equal, less then or more than the specified quarter.</p> * * @param value The Calendar value. * @param compare The <code>Calendar</code> to check the value against. * @param monthOfFirstQuarter The month that the first quarter starts. * @return Zero if the first quarter is equal to the second, -1 * if it is less than the second or +1 if it is greater than the second. */ protected int compareQuarters(Calendar value, Calendar compare, int monthOfFirstQuarter) { int valueQuarter = calculateQuarter(value, monthOfFirstQuarter); int compareQuarter = calculateQuarter(compare, monthOfFirstQuarter); if (valueQuarter < compareQuarter) { return -1; } else if (valueQuarter > compareQuarter) { return 1; } else { return 0; } }
/** * <p>Compares a calendar's quarter value to another, indicating whether it is * equal, less then or more than the specified quarter.</p> * * @param value The Calendar value. * @param compare The <code>Calendar</code> to check the value against. * @param monthOfFirstQuarter The month that the first quarter starts. * @return Zero if the first quarter is equal to the second, -1 * if it is less than the second or +1 if it is greater than the second. */ protected int compareQuarters(Calendar value, Calendar compare, int monthOfFirstQuarter) { int valueQuarter = calculateQuarter(value, monthOfFirstQuarter); int compareQuarter = calculateQuarter(compare, monthOfFirstQuarter); if (valueQuarter < compareQuarter) { return -1; } else if (valueQuarter > compareQuarter) { return 1; } else { return 0; } }