code: @Override
  	public double getDaycountFraction(LocalDate startDate, LocalDate endDate) {
  		if(startDate.isAfter(endDate)) {
  			return -getDaycountFraction(endDate,startDate);
  		}
  
  		double daysPerYear = 365.0;
  
  		// Check startDate for leap year
  		if (startDate.isLeapYear()) {
  			LocalDate leapDayStart = LocalDate.of(startDate.getYear(), Month.FEBRUARY, 29);
  			if(startDate.isBefore(leapDayStart) && !endDate.isBefore(leapDayStart)) {
  				daysPerYear = 366.0;
  			}
  		}
  
  		// Check endDate for leap year
  		if (endDate.isLeapYear()){
  			LocalDate leapDayEnd = LocalDate.of(endDate.getYear(),  Month.FEBRUARY,  29);
  			if(startDate.isBefore(leapDayEnd) && !endDate.isBefore(leapDayEnd)) {
  				daysPerYear = 366.0;
  			}
  		}
  
  		// Check in-between years for leap year
  		for(int year = startDate.getYear()+1; year < endDate.getYear(); year++) {
  			if(IsoChronology.INSTANCE.isLeapYear(year)) {
  				daysPerYear = 366.0;
  			}
  		}
  
  		double daycountFraction = getDaycount(startDate, endDate) / daysPerYear;
  
  		return daycountFraction;
  	}
docs: /* (non-Javadoc)
  @see net.finmath.time.daycount.DayCountConventionInterface#getDaycountFraction(org.threeten.bp.LocalDate, org.threeten.bp.LocalDate)