public static Calendar getSunset(double latitude, double longitude, TimeZone timeZone, Calendar date, double degrees) {
        SolarEventCalculator solarEventCalculator = new SolarEventCalculator(new Location(latitude, longitude), timeZone);
        return solarEventCalculator.computeSunsetCalendar(new Zenith(90 - degrees), date);
    }
public static Calendar getSunset ( double latitude , double longitude , TimeZone timeZone , Calendar date , double degrees ) { SolarEventCalculator solarEventCalculator = new SolarEventCalculator ( new Location ( latitude , longitude ) , timeZone ) ; return solarEventCalculator . computeSunsetCalendar ( new Zenith ( 90 - degrees ) , date ) ; }
Computes the sunset for an arbitrary declination.

@param latitude
@param longitude
Coordinates for the location to compute the sunrise/sunset for.
@param timeZone
timezone to compute the sunrise/sunset times in.
@param date
<code>Calendar</code> object containing the date to compute the official sunset for.
@param degrees
Angle under the horizon for which to compute sunrise. For example, "civil sunset"
corresponds to 6 degrees.
@return the requested sunset time as a <code>Calendar</code> object.