Skip to content

WeekdayIter

[Source]

Iterator over the fire instants of a WeekdayRecurrence. Each call to next() yields either a fresh ZonedDateTime iso^ or a NextFireError — the error is part of the value type, not a side channel.

Termination: when the iterator can't progress, the next call emits the relevant NextFireError exactly once, then has_next() returns false forever after. A for loop sees the error in the body via match, then terminates naturally on the following has_next() check.

class ref WeekdayIter is
  Iterator[(ZonedDateTime iso^ | NextFireError val)] ref

Implements


Constructors

create

[Source]

new ref create(
  r: WeekdayRecurrence val,
  after: ZonedDateTime box)
: WeekdayIter ref^

Parameters

Returns


Public Functions

has_next

[Source]

fun ref has_next()
: Bool val

Returns


next

[Source]

fun ref next()
: (ZonedDateTime iso^ | NextFireError val)

Returns