public long betweenYear(boolean isReset) {
		final Calendar beginCal = DateUtil.calendar(begin);
		final Calendar endCal = DateUtil.calendar(end);

		int result = endCal.get(Calendar.YEAR) - beginCal.get(Calendar.YEAR);
		if (false == isReset) {
			endCal.set(Calendar.YEAR, beginCal.get(Calendar.YEAR));
			long between = endCal.getTimeInMillis() - beginCal.getTimeInMillis();
			if (between < 0) {
				return result - 1;
			}
		}
		return result;
	}
public long betweenYear ( boolean isReset ) { final Calendar beginCal = DateUtil . calendar ( begin ) ; final Calendar endCal = DateUtil . calendar ( end ) ; int result = endCal . get ( Calendar . YEAR ) - beginCal . get ( Calendar . YEAR ) ; if ( false == isReset ) { endCal . set ( Calendar . YEAR , beginCal . get ( Calendar . YEAR ) ) ; long between = endCal . getTimeInMillis ( ) - beginCal . getTimeInMillis ( ) ; if ( between < 0 ) { return result - 1 ; } } return result ; }
计算两个日期相差年数<br>
在非重置情况下，如果起始日期的月小于结束日期的月，年数要少算1（不足1年）

@param isReset 是否重置时间为起始时间（重置月天时分秒）
@return 相差年数
@since 3.0.8