Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Evaluator.IncrementDate(): Allow incrementing by 0 to simplify callin…
…g sites.
  • Loading branch information
minichma committed Nov 30, 2024
commit 411d0e5010024de8da4592b4e3e2b624c5dc6e3e
5 changes: 1 addition & 4 deletions Ical.Net/Evaluation/Evaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ protected IDateTime ConvertToIDateTime(DateTime dt, IDateTime referenceDate)

protected void IncrementDate(ref DateTime dt, RecurrencePattern pattern, int interval)
{
// FIXME: use a more specific exception.
if (interval == 0)
{
throw new Exception("Cannot evaluate with an interval of zero. Please use an interval other than zero.");
}
return;

var old = dt;
switch (pattern.Frequency)
Expand Down