Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
Zmanim.Calculator.AstronomicalCalculatorAn abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at runtime, easily allowing comparison the results of using different algorithms
Zmanim.AstronomicalCalendarA calendar that calculates astronomical time calculations such as sunrise and sunset times. This class contains a Calendar and can therefore use the standard Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be changed to a different implementation by implementing the AstronomicalCalculator and setting it with the AstronomicalCalculator. A number of different implementations are included in the util package
Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as south of the North Pole as London in the northern hemisphere. The sun never reaches this dip at certain times of the year. When the calculations encounter this condition a null will be returned when a DateTime is expected and long.MinValue when a long is expected. The reason that Exceptions are not thrown in these cases is because the lack of a rise/set or twilight is not an exception, but expected in many parts of the world. Here is a simple example of how to use the API to calculate sunrise:
First create the Calendar for the location you would like to calculate:

        string locationName = "Lakewood, NJ"
        double latitude = 40.0828; //Lakewood, NJ
        double longitude = -74.2094; //Lakewood, NJ
        double elevation = 20; // optional elevation correction in Meters
        ITimeZone timeZone = new JavaTimeZone("America/New_York");
        GeoLocation location = new GeoLocation(locationName, latitude, longitude,
        elevation, timeZone);
        AstronomicalCalendar ac = new AstronomicalCalendar(location);

You can set the Date and Location on the constructor (or else it will default the the current day).

        AstronomicalCalendar ac = new AstronomicalCalendar(new DateTime(2010, 2, 8), location);

Or you can set the DateTime by calling.

        ac.DateWithLocation.Date = new DateTime(2010, 2, 8);

To get the time of sunrise

        Date sunrise = ac.getSunrise();
Zmanim.Utilities.BitConverterSystem.BitConverter.DoubleToInt64Bits method is not presents in Silverlight 3
Zmanim.ComplexZmanimCalendarThis class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis for most zmanim in this class are from the sefer Yisroel Vehazmanim by Rabbi Yisroel Dovid Harfenes.
For an example of the number of different zmanim made available by this class, there are methods to return 12 different calculations for alos (dawn) available in this class. The real power of this API is the ease in calculating zmanim that are not part of the API. The methods for doing zmanim calculations not present in this or it's superclass the ZmanimCalendar are contained in the AstronomicalCalendar, the base class of the calendars in our API since they are generic methods for calculating time based on degrees or time before or after sunrise"</see> and <see cref="AstronomicalCalendar.GetSunset">sunset and are of interest for calculation beyond zmanim calculations. Here are some examples:
First create the Calendar for the location you would like to calculate:

        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);
Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from year to year create a Zmanim.TimeZone.ITimeZone with the known start and end of DST.
To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal) use:

        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 solar transit (solar midday)). The steps involved would be to first calculate the shaah zmanis and than use that time in milliseconds to calculate 10.75 hours after sunrise starting at 12° before sunset

        long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees(12),
        czc.getSunsetOffsetByDegrees(12));
        DateTime plag = getTimeOffset(czc.getSunriseOffsetByDegrees(12),
        shaahZmanis * 10.75);
Zmanim.DateWithLocationA simple implementation of ITimeZoneDateTime
Zmanim.Utilities.GeoLocationA class that contains location information such as latitude and longitude required for astronomical calculations. The elevation field is not used by most calculation engines and would be ignored if set. Check the documentation for specific implementations of the

See also:
AstronomicalCalculator

to see if elevation is calculated as part o the algorithm

Zmanim.Utilities.GeoLocationUtilsA class for various location calculations Most of the code in this class is ported from Chris Veness' LGPL Javascript Implementation
Zmanim.Calculator.IAstronomicalCalculatorA interface that defines the sservices needed to calculate sunrise and sunset
Zmanim.IAstronomicalCalendarA calendar that calculates astronomical time calculations such as sunrise and sunset times. /summary>
Zmanim.IDateWithLocationThe GeoLocation and DateTime
Zmanim.Utilities.IGeoLocationContains location information such as latitude and longitude ... and TimeZone. /summary>
Zmanim.TimeZone.ITimeZoneProvides the most basic useage of a TimeZone. /summary>
Zmanim.Calculator.JSuntimeCalculatorImplementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm written by Jonathan Stott that is based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Jonathan's implementation was released under the GPL. Added to the algorithm is an adjustment of the zenith to account for elevation
Zmanim.Calculator.NOAACalculatorImplementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith to account for elevation
Zmanim.TimeZone.OffsetTimeZoneTimeZone based on the Gmt offset (this is very limited) /summary>
Zmanim.Calculator.SunTimesCalculatorImplementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm written by Kevin Boone that is based on the US Naval Observatory'sAlmanac for Computer algorithm ( Amazon, Barnes & Noble) and is used with his permission. Added to Kevin's code is adjustment of the zenith to account for elevation
Zmanim.Utilities.TimeA class that represents a numeric time. Times that represent a time of day are stored as

See also:
DateTime

s in this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and milliseconds of a temporal hour

Zmanim.TimeZone.WindowsTimeZoneA ITimeZone implementation of the Windows TimeZone (uses the default .net TimeZone class)
Zmanim.Utilities.ZmanWrapper class for an astronomical time, mostly used to sort collections of astronomical times
Zmanim.Calculator.ZmanimCalculatorImplementation of sunrise and sunset methods to calculate astronomical times. This implementation is a port of the C++ algorithm written by Ken Bloom for the sourceforge.net Zmanim project. Ken's algorithm is based on the US Naval Almanac algorithm. Added to Ken's code is adjustment of the zenith to account for elevation
Zmanim.ZmanimCalendar
Zmanim.Utilities.ZmanimFormatterA class used to format non DateTime times generated by the Zmanim package. For example the AstronomicalCalendar.GetTemporalHour() returns the length of the hour in milliseconds. This class can format this time
Generated on Mon May 31 12:33:39 2010 for Zmanim Project by  doxygen 1.6.3