string locationName = "Lakewood, NJ" double latitude = 40.0828; //Lakewood, NJ double longitude = -74.2094; //Lakewood, NJ double elevation = 0; ITimeZone timeZone = new JavaTimeZone("America/New_York"); GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); ComplexZmanimCalendar czc = new ComplexZmanimCalendar(DateTime.Now, location);
DateTime alos14 = czc.getSunriseOffsetByDegrees(14);
To get mincha gedola calculated based on the MGA using a shaah zmanis based on the day starting 16.1° below the horizon (and ending 16.1° after sunset the following calculation can be used: DateTime minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);
A little more complex example would be calculating plag hamincha based on a shaah zmanis that was not present in this class. While a drop more complex it is still rather easy. For example if you wanted to calculate plag based on the day starting 12° before sunrise and ending 12° after sunset as calculated in the calendars in Manchester, England (there is nothing that would prevent your calculating the day using sunrise and sunset offsets that are not identical degrees, but this would lead to chatzos being a time other than the long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees(12), czc.getSunsetOffsetByDegrees(12)); DateTime plag = getTimeOffset(czc.getSunriseOffsetByDegrees(12), shaahZmanis * 10.75);