Skip to main content

advances

Function advances 

fn advances(frequency: Period) -> bool
Expand description

Whether stepping by frequency carries the boundary cursor forward in time.

Three frequencies do not, and each would break a generator’s termination test rather than merely producing odd dates:

  • a zero multiplier (Frequency::Once) leaves the cursor where it is;
  • a Term period is “the whole term as a single period” and advances by nothing, whatever its multiplier;
  • a negative multiplier carries the cursor away from the far anchor, so the test never fires and the date arithmetic eventually overflows.

All three collapse to the lone [effective, termination] period, which is also the correct reading of the first two.