ScheduleWidget.Core 2.1.1

ScheduleWidget handles recurring events for calendars

Install-Package ScheduleWidget.Core -Version 2.1.1
dotnet add package ScheduleWidget.Core --version 2.1.1
<PackageReference Include="ScheduleWidget.Core" Version="2.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ScheduleWidget.Core --version 2.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ScheduleWidget

Scheduling engine to create recurring events for calendars

ScheduleWidget is a scheduling engine that creates recurring events for calendars.
It is an implementation based on Martin Fowler's white paper Recurring Events for Calendars
in which he describes the software design. This is a complete .NET Core 2.0 rewrite of the popular .NET Framework version.
Suppose we want to create a schedule that describes the first Monday of every month:

var builder = new ScheduleBuilder();

var schedule = builder
    .DuringMonth(WeekInterval.First)
    .OnDaysOfWeek(DayInterval.Mon)
    .HavingFrequency(FrequencyType.MonthlyByDayInMonth)
    .Create();

Once we create a Schedule we can ask it questions. The Schedule exposes methods (documented in more detail below)
that return schedule occurrences (concrete DateTime value objects) over a defined period of time. Suppose DateTime.Today
is 20 December 2030:

var during = new DateRange(DateTime.Today, DateTime.Today.AddMonths(6));

foreach (var date in schedule.Occurrences(during))
{
    Debug.WriteLine(date.ToShortDateString());
}

Output CultureInfo("en-US"):

1/6/2031
2/3/2031
3/3/2031
4/7/2031
5/5/2031
6/2/2031

That's all there is to it. Visit the Project Portal for download
instructions, detailed documentation, and code samples.

ScheduleWidget

Scheduling engine to create recurring events for calendars

ScheduleWidget is a scheduling engine that creates recurring events for calendars.
It is an implementation based on Martin Fowler's white paper Recurring Events for Calendars
in which he describes the software design. This is a complete .NET Core 2.0 rewrite of the popular .NET Framework version.
Suppose we want to create a schedule that describes the first Monday of every month:

var builder = new ScheduleBuilder();

var schedule = builder
    .DuringMonth(WeekInterval.First)
    .OnDaysOfWeek(DayInterval.Mon)
    .HavingFrequency(FrequencyType.MonthlyByDayInMonth)
    .Create();

Once we create a Schedule we can ask it questions. The Schedule exposes methods (documented in more detail below)
that return schedule occurrences (concrete DateTime value objects) over a defined period of time. Suppose DateTime.Today
is 20 December 2030:

var during = new DateRange(DateTime.Today, DateTime.Today.AddMonths(6));

foreach (var date in schedule.Occurrences(during))
{
    Debug.WriteLine(date.ToShortDateString());
}

Output CultureInfo("en-US"):

1/6/2031
2/3/2031
3/3/2031
4/7/2031
5/5/2031
6/2/2031

That's all there is to it. Visit the Project Portal for download
instructions, detailed documentation, and code samples.

  • .NETCoreApp 2.1

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.1 971 12/12/2018
2.1.0 832 12/17/2017
2.0.0 285 12/15/2017