public ShabbosCalendar(Location location) { this.location = location; }
/// <summary> /// Create a <see cref="ZmanimTrigger"/> that will occur at zman after the given time, /// and not repeat. /// </summary> /// <param name="name">The name.</param> /// <param name="group">The group.</param> /// <param name="location">The location.</param> /// <param name="startTimeUtc">The start time UTC.</param> /// <param name="executeOnZman">The execute on zman.</param> public ZmanimTrigger(string name, string group, Location location, DateTime startTimeUtc, Func<ComplexZmanimCalendar, DateTime> executeOnZman) : this(name, group, location, startTimeUtc, executeOnZman, null, 0, TimeSpan.Zero) { }
private bool IsShabbos(DateTime timeUtc, Location location) { return timeUtc.IsShabbos(location); }
/// <summary> /// Create a <see cref="ZmanimTrigger"/> that will occur at the given zman after the given time, /// and not repeat. /// </summary> /// <param name="name">The name.</param> /// <param name="location">The location.</param> /// <param name="startTimeUtc">The start time UTC.</param> /// <param name="executeOnZman">The execute on zman.</param> public ZmanimTrigger(string name, Location location, DateTime startTimeUtc, Func<ComplexZmanimCalendar, DateTime> executeOnZman) : this(name, null, location, startTimeUtc, executeOnZman) { }
/// <summary> /// Create a <see cref="ZmanimTrigger"/> that will occur at the given time, /// fire the identified <see cref="IJob"/> and repeat at the the given /// interval the given number of times, or until the given end time. /// </summary> /// <param name="name">The name.</param> /// <param name="group">The group.</param> /// <param name="jobName">Name of the job.</param> /// <param name="jobGroup">The job group.</param> /// <param name="location">The location.</param> /// <param name="startTimeUtc">A <see cref="DateTime"/> set to the time for the <see cref="Trigger"/> /// to fire.</param> /// <param name="executeOnZman">The execute on zman.</param> /// <param name="endTimeUtc">A <see cref="DateTime"/> set to the time for the <see cref="Trigger"/> /// to quit repeat firing.</param> /// <param name="repeatCount">The number of times for the <see cref="Trigger"/> to repeat /// firing, use RepeatIndefinitely for unlimited times.</param> /// <param name="repeatInterval">The time span to pause between the repeat firing.</param> public ZmanimTrigger(string name, string group, string jobName, string jobGroup, Location location, DateTime startTimeUtc, Func<ComplexZmanimCalendar, DateTime> executeOnZman, DateTime? endTimeUtc, int repeatCount, TimeSpan repeatInterval) : base(name, group, jobName, jobGroup) { StartTimeUtc = startTimeUtc; EndTimeUtc = endTimeUtc; RepeatCount = repeatCount; RepeatInterval = repeatInterval; Location = location; ExecuteOnZman = executeOnZman; }
/// <summary> /// Create a <see cref="ZmanimTrigger"/> that will occur at the zman after the given time, /// and repeat at the the given interval the given number of times, or until /// the given end time. /// </summary> /// <param name="name">The name.</param> /// <param name="group">The group.</param> /// <param name="location">The location.</param> /// <param name="executeOnZman">The execute on zman.</param> /// <param name="endTimeUtc">A UTC <see cref="DateTime"/> set to the time for the <see cref="Trigger"/> /// to quit repeat firing.</param> /// <param name="repeatCount">The number of times for the <see cref="Trigger"/> to repeat /// firing, use <see cref="RepeatIndefinitely "/> for unlimited times.</param> /// <param name="repeatInterval">The time span to pause between the repeat firing.</param> public ZmanimTrigger(string name, string group, Location location, Func<ComplexZmanimCalendar, DateTime> executeOnZman, DateTime? endTimeUtc, int repeatCount, TimeSpan repeatInterval) : base(name, group) { StartTimeUtc = DateTime.UtcNow; EndTimeUtc = endTimeUtc; RepeatCount = repeatCount; RepeatInterval = repeatInterval; }
/// <summary> /// Create a <see cref="ZmanimTrigger"/> that will occur at the zman after the given time, /// and repeat at the the given interval the given number of times, or until /// the given end time. /// </summary> /// <param name="name">The name.</param> /// <param name="location">The location.</param> /// <param name="startTimeUtc">A UTC <see cref="DateTime"/> set to the time for the <see cref="Trigger"/> to fire.</param> /// <param name="executeOnZman">The execute on zman.</param> /// <param name="endTimeUtc">A UTC <see cref="DateTime"/> set to the time for the <see cref="Trigger"/> /// to quit repeat firing.</param> /// <param name="repeatCount">The number of times for the <see cref="Trigger"/> to repeat /// firing, use <see cref="RepeatIndefinitely "/> for unlimited times.</param> /// <param name="repeatInterval">The time span to pause between the repeat firing.</param> public ZmanimTrigger(string name, Location location, DateTime startTimeUtc, Func<ComplexZmanimCalendar, DateTime> executeOnZman, DateTime? endTimeUtc, int repeatCount, TimeSpan repeatInterval) : this(name, null, location, startTimeUtc, executeOnZman, endTimeUtc, repeatCount, repeatInterval) { }
public static bool IsShabbos(this DateTime date, Location location) { return IsShabbos(GetCalendar(location, date)); }