A fully-featured .NET library for working with Cron expressions. Built with time zones in mind and intuitively handles daylight saving time transitions
The return type should be IEnumerable<DateTime> instead of DateTime?.
IEnumerable<DateTime> occurrences = expression.GetOccurrences( DateTime.UtcNow, DateTime.UtcNow.AddYears(1), fromInclusive: true, toInclusive: false);
In the README, at this paragraph: https://github.com/HangfireIO/Cronos/blob/master/README.md#getting-occurrences-within-a-range.
The return type should be
IEnumerable<DateTime>
instead ofDateTime?
.IEnumerable<DateTime> occurrences = expression.GetOccurrences( DateTime.UtcNow, DateTime.UtcNow.AddYears(1), fromInclusive: true, toInclusive: false);