/// <summary>
        /// Creates a Jewish date that corresponds to the given Gregorian date in the given location. Cut-off time is sunset.
        /// </summary>
        /// <param name="date">The Gregorian date from which to create the Jewish Date</param>
        /// <param name="location">The location. This will be used to determine the time of sunset.</param>
        public JewishDate(DateTime date, Location location)
        {
            int abs  = JewishDateCalculations.GetAbsoluteFromGregorianDate(date);
            var zman = new Zmanim(date, location);

            if (zman.GetShkia() <= date.TimeOfDay)
            {
                abs++;
            }

            this.SetFromAbsoluteDate(abs);
            this._gregorianDate = date;
            this.TimeOfDay      = date.TimeOfDay;
        }
Example #2
0
 /// <summary>
 /// Create a new DailyZmanim object for the given date and location
 /// </summary>
 /// <param name="sd">The Gregorian Date</param>
 /// <param name="location">The location</param>
 public DailyZmanim(DateTime sd, Location location)
 {
     this._zmanim = new Zmanim(sd, location);
 }