EqualizationAlgorithm { static long toJulianDay(int year, int month, int dayOfMonth) { final double millisPerDay = 86400000.0; final double epochJulianDate = -2440587.5; final GregorianCalendar utc = new GregorianCalendar(TimeZone.getTimeZone("UTC")); utc.clear(); utc.set(year, month, dayOfMonth, 0, 0, 0); utc.set(Calendar.MILLISECOND, 0); return (long) (utc.getTimeInMillis() / millisPerDay - epochJulianDate); } EqualizationAlgorithm(Product product, ReprocessingVersion version);  EqualizationAlgorithm(ProductData.UTC utc, EqualizationLUT equalizationLUT); double performEqualization(double value, int spectralIndex, int detectorIndex);  }
@Test public void testToJulianDay() { assertEquals(2455414, EqualizationAlgorithm.toJulianDay(2010, 7, 6)); assertEquals(2452365, EqualizationAlgorithm.toJulianDay(2002, 3, 1)); }