Exemplo n.º 1
0
 /// <summary>
 ///     Get prayer times for given date.
 /// </summary>
 /// <param name="when">
 ///     <see cref="Instant" /> value which represents the date.
 /// </param>
 /// <param name="settings">
 ///     Settings containing parameters for calculating prayer times.
 /// </param>
 /// <param name="coordinate">
 ///     Location's coordinate.
 /// </param>
 /// <param name="timeZone">
 ///     Location's time zone.
 /// </param>
 /// <returns>
 ///     <see cref="Prayers" /> object containing prayer times for given date.
 /// </returns>
 public static Prayers On(Instant when, PrayerCalculationSettings settings, Geocoordinate coordinate, double timeZone)
 {
     return(PrayerCalculator.GetPrayerTimesForOneDay(when, settings, coordinate, timeZone));
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Get next prayer time.
 /// </summary>
 /// <param name="settings">
 ///     Settings containing parameters for calculating prayer times.
 /// </param>
 /// <param name="coordinate">
 ///     Location's coordinate.
 /// </param>
 /// <param name="timeZone">
 ///     Location's time zone.
 /// </param>
 /// <param name="clock">
 ///     <see cref="IClock" /> interface object for getting current <see cref="Instant" /> value.
 /// </param>
 /// <returns>
 ///     <see cref="Prayer" /> object containing next prayer time data.
 /// </returns>
 public static Prayer Next(PrayerCalculationSettings settings, Geocoordinate coordinate, double timeZone, IClock clock)
 {
     return(PrayerCalculator.GetNextPrayerTime(clock, settings, coordinate, timeZone));
 }
Exemplo n.º 3
0
        /// <summary>
        ///     Get prayer times for today.
        /// </summary>
        /// <param name="settings">
        ///     Settings containing parameters for calculating prayer times.
        /// </param>
        /// <param name="coordinate">
        ///     Location's coordinate.
        /// </param>
        /// <param name="timeZone">
        ///     Location's time zone.
        /// </param>
        /// <param name="clock">
        ///     <see cref="IClock" /> interface object for getting current <see cref="Instant" /> value.
        /// </param>
        /// <returns>
        ///     <see cref="Prayers" /> object containing prayer times for today.
        /// </returns>
        public static Prayers Today(PrayerCalculationSettings settings, Geocoordinate coordinate, double timeZone, IClock clock)
        {
            var now = clock.GetCurrentInstant();

            return(PrayerCalculator.GetPrayerTimesForOneDay(now, settings, coordinate, timeZone));
        }