This:
using Cronos;
var expression = CronExpression.Parse("0 0 * * *");
// Throws exception:
expression.GetNextOccurrence(DateTime.SpecifyKind(DateTime.MaxValue, DateTimeKind.Utc));
And also this:
using Cronos;
var expression = CronExpression.Parse("42 37 13 * * *", CronFormat.IncludeSeconds);
var dateTime = DateTime.SpecifyKind(DateTime.MinValue + new TimeSpan(0, 13, 37, 42), DateTimeKind.Utc);
// Throws exception:
expression.GetPreviousOccurrence(dateTime);
Both throw:
System.ArgumentOutOfRangeException: 'Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. (Parameter 'ticks')'
Expected:
null
@odinserj
This:
And also this:
Both throw:
System.ArgumentOutOfRangeException: 'Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. (Parameter 'ticks')'
Expected:
null
@odinserj